About number theory

elementary-number-theorynumber theory

Help with the task.
Seventh grade student Ivan added 17 numbers, the decimal notation of which uses the same digit N, and other digits are not used. What is the smallest number greater than 2052201300 he could get?
Well, initially I did not understand the essence of the problem Well, I made some obvious moves Let x be the desired number, we immediately notice that x is divisible by N . Let's take a look at the remainder. x when divided by 10: x = 2052201301: x = 1 (mod 10) and further it is not clear what to do. please help me figure it out.

Best Answer

That's game/trick with repeated $99\ldots999$.

First, write down the number $2052201300$ in the base $10$: $$2052201300 = 2\cdot 10^9 + 5\cdot 10^7 + 2\cdot 10^6+2\cdot 10^5 + 1\cdot 10^3 + 3 \cdot 10^2 = $$ $$ 2\cdot (999999999+1) + \\ 5\cdot (9999999+1) + \\ 2\cdot (999999+1) +\\ 2\cdot (99999+1) + \\ 1\cdot (999+1) + \\ 3 \cdot (99+1) = $$ $$2\cdot 999999999 + \\ 5\cdot 9999999 + \\ 2\cdot 999999 + \\ 2\cdot 99999 + \\ 1\cdot 999 + \\ 3 \cdot 99 + \\ (2+5+2+2+1+3) = $$ $$ 2\cdot 999999999 + \\ 5\cdot 9999999 + \\ 2\cdot 999999 + \\ 2\cdot 99999 + \\ 1\cdot 999 + \\ 3 \cdot 99 + \\ 2\cdot 9-3. $$ Therefore the number $$\color{violet}{ 2052201303} $$ can be written as sum of $17$ numbers of the form $99\cdots99$: $$ 2052201303 = \\ 2\cdot 999999999 + \\ 5\cdot 9999999 + \\ 2\cdot 999999 + \\ 2\cdot 99999 + \\ 1\cdot 999 + \\ 3 \cdot 99 + \\ 2\cdot 9. $$

(indeed, $2+5+2+2+1+3+2 = 17$).


Actually I'm sure that $2052201303$ is what we search, but to be accurate we need to check numbers of the form $x\cdot 11\ldots111$ (for $x=1,2,3,4,5,6,7,8$) too
(and show that numbers $2052201301$ and $2052201302$ do not admit such representation).
Well, we can omit $x=3, 6$ due to divisibility by $3$.

Related Question