This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We note that:
Number of digits 1 2 3 . . . n 1 2 = 1 1 1 2 = 1 2 1 1 1 1 2 = 1 2 3 2 1 . . . = . . . # of 1s = n 1 1 1 . . . 1 1 1 2 = 1 2 3 . . . n . . . 3 2 1 Sum of digits s 1 = 1 = 1 2 s 2 = 4 = 2 2 s 3 = 9 = 3 2 . . . = . . . = . . . s n = n 2
Let us prove the claim that s n = n 2 by induction for all n . For convenience, let a n = # of 1s = n 1 1 1 . . . 1 1 1 and s ( k ) be the function to find sum of digits of integer k .
Proof:
For n = 1 , s 1 = 1 = 1 2 , the claim is true.
Assuming the claim is true for n , then
a n + 1 a n + 1 2 ⟹ s n + 1 = 1 0 n + a n = ( 1 0 n + a n ) 2 = 1 0 2 n + 2 ( 1 0 n ) a n + a n 2 = s ( 1 0 2 n + 2 ( 1 0 n ) a n + a n 2 ) = s ( 1 0 2 n ) + s ( 2 ( 1 0 n ) a n ) + s ( a n 2 ) = 1 + 2 s ( a n ) + s n = 1 + 2 n + n 2 = ( n + 1 ) 2
Therefore, the claim is also true for n + 1 and hence true for all n ≥ 1 .
For n = 6 , we have s 6 = 6 2 = 3 6 .