# Prove that the sum of digits of $(999…9)^{3}$ (cube of integer with $n$ digits $9$) is $18n$

Someone had posted a question on this site as to what would be sum of digits of $(999999999999)^3$ (twelve $9$s) 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.$

• Here is a link to the original question. As I have suggested in a comment to that question, it can be answered easily using the fact that $\underbrace{9\dots9}_{n\text{ times}}=10^n-1$. – barak manos Sep 5 '16 at 10:01
• Thanks for adding that link. – naveen dankal Sep 5 '16 at 10:50
• @the question: Similarly one can show that sum of digits for (99999.....9)^2 = 9n and for (99999.....9)^5 = 27n where (99999.....9) denotes n number of 9s – naveen dankal Sep 6 '16 at 13:06
• See the pattern : $729, 970299, 997002999, 999700029999$ etc. Can you finish it from here? – астон вілла олоф мэллбэрг Oct 6 '16 at 12:23
• did you try to expand $(10^{12}-1)^3$ using (a-b)^3=a^3+3ab^2-3ba^2-b^3$– hamam_Abdallah Oct 6 '16 at 12:39 ## 4 Answers 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$. Well, all you have to do is to observe the pattern of the cubes themselves:$9^3 = 729$.$99^3=970299999^3=9970029999999^3=999700029999$Now, you are in a position to make a conjecture: Let$(k)_n$mean the number in base$10$represented by$k$repeated$n$times. Then,$((9)_n)^3 = (9)_{n-1}7(0)_{n-1}2(9)_n$. I want you to go out and prove this conjecture yourself, use the fact that$(9)_n = 10^{n}-1$, and$(10^{n} -1 )^3 = 10^{3n} - 3\cdot 10^{2n} + 3 \cdot 10^n - 1$. Now, use the fact that the sum of digits of$(k)_n$is$nk$. Putting this formula above, the sum of digits of$((9)_n)^3$is$9(n-1) + 7 + 2 + 9(n) = 18n$. Hence, for$12$digits, your formula gives a sum of$216$, which is correct. With$n\geq 1$:$(10^n-1)^3=10^{3n}-3\cdot 10^{2n}+3\cdot 10^n -1=(10^{n-1}-1)10^{2n+1}+7\cdot 10^{2n}+2\cdot 10^n+10^n-1$. Therefore$9(n-1)+7+2+9n=18n$. • True also for$n=1\$ (our answers are literally almost identical I've noticed)... – barak manos Sep 5 '16 at 9:58
• @barak manos: Thanks. - Yes, nearly the same.:-) – user90369 Sep 5 '16 at 10:18

The cube of '9 is '72'9, where 'x is a digit before the base just before 10, so '7 = 10 -3 etc.

The sum of digits in the general base is 1'8 (ie 2,0 - 2)

When taken for the general case of 9(n)9³ = 9(n)7 0(n)2 9(n)9, it is 18n+18, but because we mean n to be the number of digits in the lead, 18(n).

• Can anybody understand this? – TonyK Oct 6 '16 at 12:50
• trying to figure it out.... – naveen dankal Nov 2 '16 at 8:26
• The notation a(b) means here a repeated b times, so 9(4)9 means 9999 9. The cube of 9999 9 is 9999 7 0000 2 9999 9 or 9(4)7 0(4)2 9(9)9. Each column adds up to 18, so 9(5) the digits add to 90. – wendy.krieger Nov 2 '16 at 11:14