document.write( "Question 891401: What is the largest 3-digit-number with the property that the number is equal to the sum of its hundreds digit, the squared of its 10 digit and the cube of its units digit? \n" ); document.write( "
Algebra.Com's Answer #539726 by richard1234(7193)![]() ![]() You can put this solution on YOUR website! There isn't a really nice analytic solution other than casework on the units digit (which is still painfully time-consuming). I wrote a small Python program that checks all possibilities (add indentations):\r \n" ); document.write( "\n" ); document.write( "def solve(): \n" ); document.write( " a = 1 \n" ); document.write( " b = 0 \n" ); document.write( " c = 0 \n" ); document.write( " for a in range(1, 10): \n" ); document.write( " for b in range(0,10): \n" ); document.write( " for c in range(0,10): \n" ); document.write( " if 100*a + 10*b + c == a + b**2 + c**3: \n" ); document.write( " print 100*a + 10*b + c \n" ); document.write( " return None\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "The solutions are 135, 175, 518, and 598, the largest of which is 598. \n" ); document.write( " |