Let $S(n)$ denote the sum of the digits of the number $n$ written in the decimal system, and let $U_{k}=11 \ldots 1$ be the number written with $k$ ones. Find those values of $k$ for which $S\left(U_{k}^{2}\right)=\left(S\left(U_{k}\right)\right)^{2}$.
I. solution. Let's write down $U_{k}^{2}$ based on how we perform written multiplication. In this process, we write down $k^{2}$ ones, $k$ in each of the $k$ rows, with each row shifted by one place value. When calculating $S\left(U_{k}^{2}\right)$, we sum the written ones column by column, then sum the digits obtained after considering the carries.

When calculating $S\left(U_{k}\right)^{2}=k^{2}$, we sum the ones row by row, then take the sum of the $k$ sums obtained, each of which is $k$.

The difference is caused by the possible carries. In the first case, when a carry occurs, instead of writing down the sum of the ones in the given column, we write down only the part of this sum that is in the units place, and add $\frac{1}{10}$ of the sum's remaining part to the number in the next place value.

Such a loss occurs with each carry, and a carry occurs when there is a column with at least ten ones, which happens when the value of $k$ is at least 10. Therefore, $S\left(U_{k}^{2}\right) = S\left(U_{k}\right)^{2}$ holds for $k_{0}$ as well.

If we calculate, then $S\left(U_{9}^{2}\right) = 9^{2}$ and $S\left(U_{10}^{2}\right) = 82 < 10^{2}$. According to the above, this means that

$$
S\left(U_{k}^{2}\right) = S\left(U_{k}\right)^{2}, \quad \text{if} \quad 1 \leq k \leq 9 \quad \text{and} \quad S\left(U_{k}^{2}\right) < S\left(U_{k}\right)^{2}, \quad \text{if} \quad 10 \leq k
$$

Agnes Antal (Budapest, Apaczai Csere Janos Gymnasium, 12th grade)