Sum of Digits of (999…9)^3 is 18n – Elementary Number Theory Proof

elementary-number-theory

Someone had posted a question on this site as to what would be sum of digits of $999999999999^3$ (twelve $9s$ ) equal to?

I did some computation and found the pattern that sum of digits of $9^3 = 18$, $99^3 = 36$, $999^3 = 54$ and so on. So, I had replied that sum of digits of $999999999999^3 = 12 \cdot 18 = 216$.

Can anybody help me prove this, that sum of digits of $(\underbrace{999\dots9}_{n\text{ times}})^3 = 18n.$

Best Answer

Observe that:

$\left(\underbrace{9\dots9}_{n\text{ times}}\right)^3=(10^n-1)^3=10^{3n}-3\cdot10^{2n}+3\cdot10^{n}-1=\underbrace{9\dots9}_{n-1\text{ times}}7\underbrace{0\dots0}_{n-1\text{ times}}2\underbrace{9\dots9}_{n\text{ times}}$


Therefore, the sum of digits is $9(n-1)+7+2+9n=18n$.