How many digits do we need if we want to write down every integer from 1 to $10^{n}$?

---

The translation maintains the original text's format and line breaks.
The one-digit numbers: $1, \ldots 9$; their number is $9=9 \cdot 10^{0}$.

The two-digit numbers: $10, \ldots 99$; their number is $99-9=90=9 \cdot 10^{1}$.

The three-digit numbers: $100, \ldots 999$; their number is $999-99=900=9 \cdot 10^{2}$.

The $n$-digit numbers: $10^{n-1}, \ldots 99, \ldots \stackrel{n}{9}$; their number is $9 \cdot 10^{n-1}$. 1

The number of digits required to write these numbers is

$$
\begin{aligned}
S & =1 \cdot 9 \cdot 10^{0}+2 \cdot 9 \cdot 10^{1}+3 \cdot 9 \cdot 10^{2}+\ldots+n \cdot 9 \cdot 10^{n-1}= \\
& =9\left(1 \cdot 10^{0}+2 \cdot 10^{1}+3 \cdot 10^{2}+\ldots+n \cdot 10^{n-1}\right)
\end{aligned}
$$

The sum in parentheses is the value of the expression

$$
1+2 x+3 x^{2}+\ldots+n x^{n-1}
$$

when $x=10$. However,

$$
\begin{gathered}
1+2 x+3 x^{2}+\ldots+n x^{n-1}=\frac{d}{d x}\left(x+x^{2}+x^{3}+\ldots+x^{n}\right)=\frac{d}{d x} \cdot \frac{x^{n+1}-x}{x-1}= \\
=\frac{\left[(n+1) x^{n}-1\right](x-1)-\left(x^{n+1}-x\right)}{(x-1)^{2}}=\frac{n x^{n+1}-(n+1) x^{n}+1}{(x-1)^{2}}
\end{gathered}
$$

If now $x=10$, then

$$
\begin{gathered}
S=9 \frac{n \cdot 10^{n+1}-(n+1) 10^{n}+1}{9^{2}}=\frac{10 n \cdot 10^{n}-(n+1) 10^{n}+1}{9}= \\
=\frac{1}{9}\left[(9 n-1) 10^{n}+1\right]
\end{gathered}
$$

Nagy Elemér (Cistercian Szent Imre rg. VII. o. Bp.).

The problem could also have been approached by including the number of digits of $10^{n}$ in the sum $S$. Several people solved it in this sense.[^0]


[^0]:    ${ }^{1} \mathrm{Each}$ of the digits $1,2, \ldots, 9$ can be appended with the 10 elements $(n-1)$-th division variations with repetition.