2007 iTest Problems/Problem 38

Problem

Find the largest positive integer that is equal to the cube of the sum of its digits.

Solution

Clearly this number is the cube of a positive integer $n$ so let $n^3$ be the number we seek. The sum of the digits of $n$ is equal to $n\mod{9}$, so $n^3\equiv n\mod{9}$ or $n(n+1)(n-1)=9k$ for some natural $k$. Because there is only one factor of 3 in a set of 3 consecutive numbers, one of $n$, $n-1$, or $n+1$ must be divisible by 9. Now note that $n$ has maximum 5 digits because else the prompt is always false (solution to $10^n>(9(n+1))^3$), so $n\le\sqrt[3]{100000}\approx46$. Thus $n$ could be $46,45,44,37,36,35,28,27,26\dots$. The first three numbers are clearly ineligible because they would require too many high digits. Then we test each number. $37^3=50653$, $36^3=46656$, $35^3=42875$, $28^3=21952$, and finally $27^3=19683\rightarrow1+9+6+8+3=27$, so the answer is $\boxed{19683}$.

See Also

2007 iTest (Problems, Answer Key)
Preceded by:
Problem 37
Followed by:
Problem 39
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 TB1 TB2 TB3 TB4