1 0 5 digits 6 6 6 6 6 6 6 … 6 8 2
Find the sum of the digits of the number above (when it is expanded).
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.
Here we can consider the pattern followed by the squares of 68.
6 8 2 = 4 6 2 4
6 6 8 2 = 4 4 6 2 2 4
6 6 6 8 2 = 4 4 4 6 2 2 2 4
We can notice that the number of 6 in the number is same as number of 2 & 4 in the square of the number. Also there is only one six and one four in the middle and end respectively.
In the question there are ( 1 0 5 − 1 ) 6 ′ s
Therefore we need the sum of:
4 ( 1 0 5 − 1 ) + 6 + 2 ( 1 0 5 − 1 ) + 4 =
6 0 0 0 0 4
It's a nice pattern, but is it a proof?
The trickiest part of this problem is that it's not asking you the number of the digits, but the sum of them. 4(10^5-1) + 6 +2(10^5-1) +4, 6(10^5-1) +10, 600000-6+10, 600000+4, 600004
Did the same way
Interestingly, Inline Ruby CAN actually handle it..
a=('6'*99_999+'8').to_i
b = a*a
b.to_s.split('').map{|l|l.to_i}.inject(0){|s,l|s+l}
600004
Problem Loading...
Note Loading...
Set Loading...
Lemma: let d be a digit and n a positive integer. Then the number consisting of the digit d repeated n times is equal to n d d ⋯ d = 9 d ⋅ 1 0 n − 9 d .
We apply this to the given number: A n = n − 1 6 6 ⋯ 6 8 = n 6 6 ⋯ 6 + 2 = 3 2 ⋅ 1 0 n + 3 4 . Square this: A n 2 = ( 3 2 ⋅ 1 0 n + 3 4 ) 2 = 9 4 ⋅ 1 0 2 n + 9 1 6 ⋅ 1 0 n + 9 1 6 = 9 4 ⋅ 1 0 2 n + 2 ⋅ 1 0 n − 9 2 ⋅ 1 0 n + 2 − 9 2 . We use the Lemma again, now in the opposite direction: A n 2 = ( 2 n 4 4 ⋯ 4 + 9 4 ) + 2 ⋅ 1 0 n − ( n 2 2 ⋯ 2 + 9 2 ) + 2 − 9 2 = ( n 4 4 ⋯ 4 n 0 0 ⋯ 0 + n 4 4 ⋯ 4 ) − n 2 2 ⋯ 2 + 2 ⋅ 1 0 n + 2 = n 4 4 ⋯ 4 n 0 0 ⋯ 0 + ( n 4 4 ⋯ 4 − n 2 2 ⋯ 2 ) + 2 ⋅ 1 0 n + 2 = n 4 4 ⋯ 4 n 0 0 ⋯ 0 + n 2 2 ⋯ 2 + 2 ⋅ 1 0 n + 2 = n 4 4 ⋯ 4 n 2 2 ⋯ 2 + 2 ⋅ 1 0 n + 2 = n − 1 4 4 ⋯ 4 6 n − 1 2 2 ⋯ 2 4 . The sum of digits is therefore 4 ( n − 1 ) + 6 + 2 ( n − 1 ) + 4 = 6 n + 4 , which for n = 1 0 5 results in 6 0 0 0 0 4 .