Let $L$ be the number formed by $2022$ digits equal to $1$, that is, $L=1111\dots 111$. Compute the sum of the digits of the number $9L^2+2L$.
Problem
Source:
Tags: number theory
BackToSchool
13.12.2022 20:05
$$L= \underbrace {1111\dots 111}_{2022}$$\begin{align*}
9L^2+2L
&= L(9L+2) \\
&= \underbrace {1111\dots 111}_{2022} \cdot (\underbrace {9999\dots 999}_{2022} +2) \\
&= \underbrace {1111\dots 111}_{2022} \cdot (1\underbrace {0000\dots 000}_{2021} 1) \\
&= \underbrace {1111\dots 111}_{4044}
\end{align*}The sum of the digits is $\boxed {4044}$.
PennyLane_31
14.08.2023 17:45
First, let's define $L_i= \underbrace{1111...1111}_{i}$. Also, call $S(n)$ the sum of digits of $n$. So, we want $S(9(L_{2022})^2+2L_{2022})$. Let's make some cases to see what happens! For $L_1=1$, we would have: $S(9(1)^2+2(1))$= $S(9+2)= S(11)= 2$. For $L_2= 11$, we would have $S(9(11)^2+2(11))= S(9\cdot 121+22)= S(1089+22)= S(1111)= 4$ Did you see anything? Well, let's go to the solution!
We can generalize this.
Notice that $$L_{k}= \frac{10^{k}-1}{9}\implies S(9\cdot(L_{k})^2+2\cdot (L_{k})).$$So, we have:
$S(9\cdot(\frac{10^{k}-1}{9})^2+2\cdot (\frac{10^{k}-1}{9})\implies S( \cancel{9}\cdot \frac{(10^{k}-1)^2}{\cancelto{9}{81}}+2\cdot\frac{10^{k}-1}{3}\cdot\frac{1}{3}+\frac{1}{9}-\frac{1}{9}$
$$=\underbrace{(\frac{10^{k}-1}{3})^2+2\cdot\frac{10^{k}-1}{3}\cdot\frac{1}{3}+\frac{1}{9}}_{(\frac{10^{k}-1}{3}+\frac{1}{3})^2}-\frac{1}{9}$$
Finally, we'll have $S(9(L_{k})^2+2L_{k})= S((\frac{10^{k}\cancel{-1}\cancel{+1}}{3})^2)-\frac{1}{9})= S(\frac{(10^{k})^2}{9}-\frac{1}{9})= S(\frac{10^{2k}-1}{9}).$
Notice that $S(\frac{10^{2k}-1}{9})= S(L_{2k})$. So, for $k= 2022$, we have $S(L_{4044})= S(\underbrace{1111...1111}_{4044})= \underbrace{1+1+1+...+1+1}_{4044}= 4044.$
Therefore, $S(9(L_{2022})^2+2(L_{2022}))= 4044$.