lem wrote:Interesting observation. There is no single cube number that is between 1^3 and 65000^3 (this is as far as excel will go in one shot) whose sum of digits is 43.
Therefore it must be square and under 500000, which leaves 499849 as the only answer between 1 and 65000^3. It would be an interesting problem to *prove* that no cube number can have a sum of digits of 43, but it goes beyond the scope of this problem, since we have a single answer that fits the question. I'm pretty sure TNT meant that one...
There is a simple proof that there is no cube with digits that sum to 43. The digital root of N cubed is the cube of the digital root of N. No cube has a digital root of seven (you only have to test the numbers 0-8 to show this); so no cube can have digits that sum to 43.
Also, only numbers with digital roots of four or five have squares with digital roots of seven. Therefore, for this problem, you only have to check 2/9 of the squares in the range that stapel provided.
The digital root of a number, N, is N mod 9 (the remainder when you divide N by 9). It can be computed by adding the digits of N. If the sum has more than one digit, repeat the process on the sum. Continue until you get to a single digit (0 and 9 are equivalent). It's also called casting out the nines.