[Math] Sum of cubes of the digits of a number equal to the number

number theoryrecreational-mathematics

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)?

Best 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.