Difference between revisions of "2007 iTest Problems/Problem 38"

(Created page with "== Problem == Find the largest positive integer that is equal to the cube of the sum of its digits. == Solution ==")
 
 
Line 4: Line 4:
  
 
== Solution ==
 
== Solution ==
 +
Clearly this number is the cube of a positive integer <math>n</math> so let <math>n^3</math> be the number we seek. The sum of the digits of <math>n</math> is equal to <math>n\mod{9}</math>, so <math>n^3\equiv n\mod{9}</math> or <math>n(n+1)(n-1)=9k</math> for some natural <math>k</math>. Because there is only one factor of 3 in a set of 3 consecutive numbers, one of <math>n</math>, <math>n-1</math>, or <math>n+1</math> must be divisible by 9. Now note that <math>n</math> has maximum 5 digits because else the prompt is always false (solution to <math>10^n>(9(n+1))^3</math>), so <math>n\le\sqrt[3]{100000}\approx46</math>. Thus <math>n</math> could be <math>46,45,44,37,36,35,28,27,26\dots</math>. The first three numbers are clearly ineligible because they would require too many high digits. Then we test each number. <math>37^3=50653</math>, <math>36^3=46656</math>, <math>35^3=42875</math>, <math>28^3=21952</math>, and finally <math>27^3=19683\rightarrow1+9+6+8+3=27</math>, so the answer is <math>\boxed{19683}</math>.
 +
==See Also==
 +
{{iTest box|year=2007|num-b=37|num-a=39}}
 +
 +
[[Category:Intermediate Number Theory Problems]]

Latest revision as of 23:48, 5 April 2024

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