Sum of cubes of the digits of a number equal to the number

I have a number, I don't know how large or small, but if I cube the digits of the number and sum them, the sum is equal to the number itself. In other words, $$\sum_{k=1}^n{a_k^3}=\sum_{k=1}^{n}{a_k 10^{k-1}}$$ I know a couple of answers just by guess and check, but I'd rather have a concrete way. I know by some simple analysis that the number can't be a two digit number since $$a^3+b^3=10a+b \Rightarrow a^3-10a=b-b^3 \Rightarrow a(a^2-10)=b(1-b^2)$$ So $b^2$ can either be 0 or 1, but that produces either a $0$ or $1$ for a and that doesn't work (the trivial solutions are of course $0^3=0$ and $1^3=1)$. So the number must be at least three digits. Also, since $$9^3+9^3+9^3+9^3+9^3=5(729)=3,645$$ The number can at most be 4 digits. So from here, $$a^3+b^3+c^3=100a+10b+c$$or$$a^3+b^3+c^3+d^3=1,000a+100b+10c+d$$ By guess and check I got 153 as one answer $(1^3+5^3+3^3=1+125+27=153)$. But I know there are 11 more solutions and I'm not guessing them all. Outside writing a program to extract them, how can I solve the two equations above to get he remaining solutions (not sure if the question I'm solving includes the trivial solutions or not,so there might only be 9 more)?

• So $b^2$ can either be $0$ or $1$ - You seem to forget the fact that $a^2-10<0$ for $a=0\ldots3$. Jan 12, 2014 at 13:53
• Oh your right...so if $a=b$, then $a^2-10=1-b^2$ or $b^2-10=1-b^2$. Then $2b^2=11$ so $a\neq{b}$... Jan 12, 2014 at 13:59
• Jan 12, 2014 at 14:01
• Jan 12, 2014 at 14:03
• I mixed this problem up with another problem where it was looking for 12 solutions. I see now that there are only the 4 outside the trivial solutions of $0,1$. Again, though, outside just writing a program, how can you solve $a^3+b^3+c^3=100a+10b+c$ algebraically? Jan 12, 2014 at 14:07

1 Answer

As pointed out, a part of the problem you have raised refers to Armstrong numbers / narcissistic numbers, i.e., $n$-digit numbers equal to the sum of $n$-th power of its digits. Besides that, there is nothing really special about such numbers. For $n=3$, there are only $4$ such numbers, $153,370,371$ and $407$. There is no analytical means to solve those equations exactly, thus one has to rely on trial-and-error or brute force.

The other part, where a 4-digit number is equal to sum of third powers of its digits, does not have any solution. Consider, as you showed: $$a^3+b^3+c^3=100a+10b+c$$ Adding, $1000$ on both sides, we have: $$10^3+a^3+b^3+c^3=1000+100a+10b+c$$ Clearly, for any $d \in [1,9]$, we have: $$10^3+a^3+b^3+c^3 \leq 1000d+100a+10b+c$$ And thus: $$d^3+a^3+b^3+c^3 < 1000d+100a+10b+c$$ Conclusion: no solutions exist.

• The proof that there is no four digit number is not sufficient. It presumes that you start with a three digit solution and tries to extend that. There might be a solution in four digits that is not of this form. In fact there is not. Jun 5, 2020 at 4:22