10.4. The sequence $a_{n}$ is defined as follows: $a_{1}=2^{20}, a_{n+1}=s\left(a_{n}\right)$ for all $n$, where $s(a)$ denotes the sum of the digits of the natural number $a$. Find $a_{100}$.
Answer: 5. Solution. The main fact used is that the sum of the digits of any number has the same remainder when divided by 9 as the number itself. This fact is proven in the same way as the well-known divisibility rule for 9. We will show that the sequence $a_{n}$ decreases rapidly until it becomes less than 10, and after that, it obviously becomes constant. Indeed, if the number $n$ is $k$-digit, then $n>10^{k-1}$, and $s(n) \leq 9 k < 10^{k / 2} = \sqrt{10}^{k}$ for $k \geq 4$ (the last inequality is easily proven by induction). The initial number $a_{1}=2^{20}$ is less than $10^{1024}$, since $2^{2015} < (2^{3})^{672} < 10^{1024}$. Therefore, $a_{2}<10^{528}, a_{3}<10^{256}, \ldots, a_{9}<10^{4}$, i.e., $a_{9}$ has no more than three digits. Hence, $a_{10} \leq 3 \cdot 9 = 27$ and, obviously, $a_{12}<10$. It remains to find the remainder of $2^{2015}$ when divided by 9. Since $2^{3}$ has the form $9 p - 1$ (i.e., it has a remainder of 8 when divided by 9), then $2^{2013} = (2^{3})^{671}$ also has such a form (as the product of an odd number of factors of the form $9 p - 1$), and $2^{2015} = 2^{2013} \cdot 4 = (9 p - 1) \cdot 4 = 9 q + 5$ (where $q = 4 p - 1$).