The three-digit number with a twist

What is the largest three-digit number with the property that the number is equal to the sum of its hundreds digit, the square of its tens digit and the cube of its units digit?


The answer is 598.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Bithiah Koshy
Jun 21, 2020

Interesting...

Mahdi Raza - 11 months, 3 weeks ago

Let the three-digit number be a b c abc :

100 a + 10 b + c = a + b 2 + c 3 100a + 10b + c = a + b^2 + c^3

By rearranging, we get:

99 a + b ( 10 b ) = ( c 1 ) c ( c + 1 ) 99a + b(10 - b) = (c - 1)c(c + 1)

Seeing that when a = b = 4 , 7 a = b = 4, 7 and c = 3 , 8 c = 3, 8 , it produces solutions, substitute these values into the equation. We get:

n = 135 , 175 , 518 , 598 n = 135, 175, 518, 598 .

Therefore n = 598 \fbox{n = 598} is the largest solution.

Mahdi Raza
Jun 21, 2020
1
2
3
4
5
6
7
import math

for a in range(1, 10):
    for b in range(0, 10):
        for c in range(0, 10):
            if (100*a + 10*b + c == a + b**2 + c**3):
                print (a,b,c)

Output

1
2
3
4
1 3 5
1 7 5
5 1 8
5 9 8

The largest number is 598 \boxed{598}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...