If $n=\overline{a_1a_2\cdots a_{k-1}a_k}$, be $s(n)$ such that . If $k$ is even, $s(n)=\overline{a_1a_2}+\overline{a_3a_4}\cdots+\overline{a_{k-1}a_k}$ . If $k$ is odd, $s(n)=a_1+\overline{a_2a_3}\cdots+\overline{a_{k-1}a_k}$ For example $s(123)=1+23=24$ and $s(2021)=20+21=41$ Be $n$ is $digital$ if $s(n)$ is a divisor of $n$. Prove that among any 198 consecutive positive integers, all of them less than 2000021 there is one of them that is $digital$.
Problem
Source: Mexico National 2021 P5
Tags: number theory
x3yukari
11.11.2021 06:11
Notice that $s(n) \equiv n \pmod{99}.$ So if $s(n)=99, n$ is digital. Also, if $s(n)=198,$ and $n$ is even, then $n \equiv 0 \pmod{198}$ and $n$ is digital. So for any digital integer $n$ with $s(n)=198, n+198$ is also digital since if $s(n) \equiv 0 \pmod{99},$ it is (except in some special cases we will address) at most $198.$
The only two cases where this is false is $999999,$ which we don't have to worry about since it's odd, and $1999998,$ which also turns out to be digital.
Thus every $n \equiv 0 \pmod{198}$ is digital, and the result follows.
ChCar
25.10.2022 23:38
To start, we can see that $99 | s(99k)$. If $99k$ has an odd number of digits then, $$ s(99) = 10(a_{1} + a_{3} + \cdots + a_{k-1}) + ( a_{2} + a_{4} + \cdots + a_{k}) $$ And $(a_{1} + a_{2} + \cdots + a_{k})\equiv 0 \pmod{9}$ as well $(-a_{1} + a_{2} - \cdots +a_{k})\equiv 0 \pmod{11}$ So $99| s(99k)$ The procedure is similar with an even number of digits. Now if $n < 2,000,021$ and is a multiple of $99$ then $ s(n) \in \{99, 99\cdot2, 99\cdot3\} $. Among 198 consecutive integers there is one that is multiple of 198. If $s(n) \neq 99\cdot3$ then $n = 1,999, 998$ but this is a digital number as well.