Summing Powers

For all positive integers 1 < n k 1<n\leqslant k , there exist non-negative single digit integers a 1 , a 2 , a 3 , , a n a_1, a_2, a_3, \ldots, a_n ( a 1 0 ) (a_1\ne 0) which satisfy a 1 a 2 a 3 a n = ( a 1 + a 2 + a 3 + + a n ) n . \overline{a_1a_2a_3\ldots a_n}=( a_1+ a_2+ a_3+\cdots+ a_n)^n.

Find the greatest value of k k .


This is one part of 1+1 is not = to 3 .


The answer is 4.

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

Kenneth Tan
Sep 19, 2014

What the equation a 1 a 2 a 3 a n = ( a 1 + a 2 + a 3 + + a n ) n \overline{a_1a_2a_3\ldots a_n}=( a_1+ a_2+ a_3+\ldots+ a_n)^n actually says is that an n n -digit number equals to the digit sum of the n n -digit number to the power of n n .

Firstly, since we know that a 1 a 2 a 3 a n \overline{a_1a_2a_3\ldots a_n} is an n n -digit number, hence a 1 a 2 a 3 a n = ( a 1 + a 2 + a 3 + + a n ) n < 1 0 n \overline{a_1a_2a_3\ldots a_n}=(a_1+a_2+a_3+\ldots+a_n)^n<10^n a 1 + a 2 + a 3 + + a n < 10 a_1+a_2+a_3+\ldots+a_n<10 So the digit sum of the n n -digit number could be any number from 1 to 9.

For convenience, let's just let the digit sum of the n n -digit number be p p .

Since n > 1 n>1 , thus a 1 a 2 a 3 a n 10 \overline{a_1a_2a_3\ldots a_n}\geqslant10 .


Consider p = 1 p=1 , then a 1 a 2 a 3 a n = 1 < 10 \overline {a_1a_2a_3\ldots a_n}=1<10 contradicts a 1 a 2 a 3 a n 10 \overline{a_1a_2a_3 \ldots a_n}\geqslant10 , so p p cannot be 1.


Consider p = 2 p=2 , then we have to find a number which its digit sum is 2 and can be expressed as 2 n 2^n . But for any integer n > 1 n>1 , the digit sum of 2 n 2^n must be greater than 2 (this can be easily proved), so p p cannot be 2.


Consider p = 3 p=3 , then we have to find a number which its digit sum is 3 and can be expressed as 3 n 3^n . But for any integer n > 1 n>1 , the digit sum of 3 n 3^n must be greater than 3 (since 3 n 3^n is a multiple of 9 when n > 1 n>1 , thus the sum of digits must be a multiple of 9), so p p also cannot be 3.


p p also can't be 4 as the digit sum of 4 n 4^n is always greater than 4 when n > 1 n> 1 .


The same situation applies to when p = 5 p=5 and p = 6 p=6 .


Now consider p = 7 p=7 , plugging in n = 1 , 2 , 3 , 4 n=1,2,3,4 and we find out when n = 4 n=4 , 7 4 = 2401 7^4=2401 satisfies the equation, let's see the case when n > 4 n> 4 , by some experiments we see that 7 5 7^5 and 7 6 7^6 doesn't satisfy the equation, when n n reaches 7, 7 7 = 823543 7^7=823543 is not a 7-digit number, so for n > 7 n>7 , 7 n 7^n must not be an n n -digit number, therefore, there's no such number 7 n 7^n that satisfies the equation when n > 4 n> 4 .


Now consider p = 8 p=8 , doing some experiments we find out when n = 3 n=3 , 8 3 = 512 8^3=512 satisfies the equation, when 3 < n < 11 3<n<11 , 8 n 8^n doesn't satisfy the equation, when n 11 n\geqslant11 , 8 n 8^n is not an n n -digit number.


As for p = 9 p=9 , we can easily get that 9 2 = 81 9^2=81 satisfies the equation, If p > 2 p>2 , then the digit sum of 9 n 9^n would be greater than 9.


Combining all the situations above, we find that the greatest value of n n is 4, so the greatest value of k k is 4.

great solution thank u very much

Aryaman Das - 5 years, 8 months ago
Kenny Lau
Sep 9, 2014

java code:

public class brilliant201409092308{
    public static void main(String[] args){
        for(int n=2;;n++){
            boolean found = false;
            for(int i=2;i<10&&i<9*n;i++){
                long pow = 1;
                for(int j=0;j<n;j++) pow *= i;
                int sum = 0;
                long copy = pow;
                while(copy>9){
                    sum += ((int)(copy%10));
                    copy /= 10;
                }
                sum += copy;
                if(sum==i){
                    found = true;
                    System.out.println(sum+":"+pow);
                    break;
                }
            }
            if(!found){
                System.out.println(n-1);
                break;
            }
        }
    }
}

output:

9:81
8:512
7:2401
4
Press any key to continue . . .

Note: I let i run through the possible values of the digit sum.

Kenny Lau - 6 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...