## Task B-4.4.

The following functions are given:

$$
f(x)=10^{10 x}, g(x)=\log \left(\frac{x}{10}\right), h_{1}(x)=g(f(x)), h_{n}(x)=h_{1}\left(h_{n-1}(x)\right)
$$

for all $n \geqslant 2$. Determine the sum of the digits of the number $h_{2015}(1)$.
## Solution.

First, let's determine $h_{1}(x)=g(f(x))=10 x-1$. Then,

$$
\begin{aligned}
& h_{2}(x)=h_{1}\left(h_{1}(x)\right)=10(10 x-1)-1=10^{2} x-10-1, \quad h_{2}(1)=10^{2}-10-1=89 \\
& h_{3}(x)=h_{1}\left(h_{2}(x)\right)=10\left(10^{2} x-10-1\right)-1=10^{3} x-10^{2}-10-1, \quad h_{3}(1)=10^{3}-10^{2}-10-1=889
\end{aligned}
$$

It is clear that the $n$-th term will be $h_{n}(1)=10^{n}-\left(10^{n-1}+\ldots+10+1\right)$. The expression in parentheses is the sum of $n$ terms of a geometric sequence with the first term 1 and the common ratio 10. Therefore,

$$
h_{n}(1)=10^{n}-\frac{10^{n}-1}{9}=10^{n}-\frac{999 \ldots 9}{9}=10^{n}-\underbrace{111 \ldots 11}_{n \text { ones }}
$$

Then the desired number is

$$
h_{2015}(1)=10^{2015}-\underbrace{111 \ldots 11}_{2015 \text { ones }}=\underbrace{888 \ldots 88}_{2014 \text { eights }} 9 \text {. }
$$

The sum of the digits of this number is $2014 \cdot 8+9=16121$.