Problem

Source: All Russian MO 2015, grade 10, problem 4

Tags: number theory, Sequence



We denote by $S(k)$ the sum of digits of a positive integer number $k$. We say that the positive integer $a$ is $n$-good, if there is a sequence of positive integers $a_0$, $a_1, \dots , a_n$, so that $a_n = a$ and $a_{i + 1} = a_i -S (a_i)$ for all $i = 0, 1,. . . , n-1$. Is it true that for any positive integer $n$ there exists a positive integer $b$, which is $n$-good, but not $(n + 1)$-good? A. Antropov