Five digits in our right hand

Let x x denote the sum of all digits of 777 7 7777 7777^{7777} . Now, let y y be the sum of all digits of x x . Similarly, let z z denote the sum of all digits of y y . What is the sum of all digits of z z ?


The answer is 1.

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.

2 solutions

Let our answer be a a .

Observe that, as 1 0 n 1 ( m o d 9 ) 10^n\equiv 1\; (mod\; 9) ,

777 7 7777 x y z a ( m o d 9 ) 7777^{7777}\equiv x\equiv y\equiv z\equiv a\; (mod\; 9) .

Thus, the easiest part of the solution is, 7777 ( 7 + 7 + 7 + 7 ) 1 ( m o d 9 ) 7777\equiv (7+7+7+7)\equiv 1\; (mod\; 9)

777 7 7777 1 ( m o d 9 ) \implies 7777^ {7777}\equiv 1\; (mod\; 9) .

The answer could be 1 , 10 , 19 , 28 , 37 , . . . 1,10,19,28,37,... To get the correct answer, we have to work out an inequality to frame a limit.

In this part, see that 777 7 7777 < ( 1 0 5 ) 7777 = 1 0 38885 7777^{7777}<(10^5)^{7777}=10^{38885} . Which implies, 777 7 7777 7777^{7777} does not have more than 38886 38886 digits.

Thus, x x cannot have more than 9 × 38886 = 349974 9\times 38886=349974 . So, the highest possible y y occurs when x = 299999 x=299999 .

And so, y 47 y\le 47 . Similarly, the highest possible z z occurs when y = 39 y=39 . So, z 12 z\le 12 .

Consequently, k < 10 k<10 .

This proves that our answer is 1 \boxed 1 .

Great solution. This is exactly the same solution used for q4 of imo 1975.

Omkar Kamat - 6 years, 5 months ago

How can you write this inequality to calculate its maximum digits

Ankit Jain - 6 years, 5 months ago

What is k, and can you explain why it must be less than 10? Otherwise your solution looks great!

Rogers Epstein - 6 years, 5 months ago

Log in to reply

This person makes thousand mistakes everyday. k k is actually a a .

Sheikh Sakib Ishrak Shoumo - 6 years, 5 months ago
Brock Brown
Dec 26, 2014

A quick Python solution:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
num = 7777**7777
def digit_sum(x):
    total = 0
    for digit in str(x):
        total+=int(digit)
    return total
x = digit_sum(num)
y = digit_sum(x)
z = digit_sum(y)
print digit_sum(z)

Brown, we could reduce the order of the algorithm by using the basic number theory approach used here. Also, your marvelous (and short) solution would be somehow improved with this. However, the case is nice for Python. You are handing over the duty of adding the digits to the CPU. Can you modify your program now? Thanks in advance.

Sheikh Asif Imran Shouborno - 6 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...