Do You Have A Clever Solution?

Find the number of positive integers that are equal to the sum of the squares of their digits.


For example, 15 15 does not have this property, since 1 2 + 5 2 = 26 15. 1^2 + 5^2 = 26 \ne 15.

Bonus: Explain and share your approach with others!


The answer is 1.

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.

2 solutions

Pritthijit Nath
Aug 28, 2016

First Step : Let us consider a single integer. There are digits ranging from 0 to 9, of which 1 is the obvious answer considering the conditions imposed by the question. Okay, let's move to the second step.

Second Step : Let us consider double digit integers. There are integers ranging from 10 to 99. We have to find whether the two digit number supports the conditions imposed or not.

10 x + y = x 2 + y 2 = 10 y + x . . . . . . . . . . . . . . . . . . . . . . . . e q . 1 10x+y=x^2+y^2=10y+x ........................ eq.1 where x,y are single digit integers. In case you are wondering why is 10 x + y = 10 y + x 10x+y = 10y+x , just think if the middle expression holds true then this would be quite obvious.

On solving 10 x + y = 10 y + x 10x+y=10y+x we can conclude that x = y . . . . . . . . . . . . . . . . . . . . . . . . e q . 2. x = y ........................eq.2.

Solving eq.2 in eq.1, we get 2 y 2 = 11 2y^2=11 y which is never possible for an integer. So two digit numbers are not possible at all which satisfy the given conditions.

Intermediate Step : One must also realize from eq.1 that this condition satisfies only permuations of digits of a satisfying integer. Maximum sum is 81 + 81 + 81 = 243 81+81+81 = 243 , therefore 4 digit numbers will not exist at all.

Third Step : Let us consider triple digit integers. There are integers ranging from 100 to 999. We have to find whether the two digit number supports the conditions imposed or not.

100 z + 10 x + y = x 2 + y 2 = 100 y + 10 x + 100 z = 100 z + 10 y + x = 100 y + 10 z + x = 100 x + 10 y + z = 100 x + 10 z + y . . . . . . . . . . . . . . . . . . . . . . . . e q . 3 100z+10x+y=x^2+y^2=100y+10x+100z=100z+10y+x=100y+10z+x=100x+10y+z=100x+10z+y ........................ eq.3 where x,y,z are single digit integers.

Solving the different parts will give us an equation similar to eq.1 hence three digit numbers are not possible at all which satisfy the given conditions.

The answer is : 1 \boxed{1}

Phi Li
Nov 20, 2015

10a + b = a^{2} +b^{2}
10a - a^{2} = b^2 - b
a(10-a) = b(b-1)

Use trial and error to test "a" from 0 to 9.

Only 0 works.

You have shown for 2 digit numbers, how can you show that there are no other 3 digit or 4 digit or any other number which satisfies the condition.

Kushagra Sahni - 5 years, 6 months ago

Log in to reply

First of all, four digit numbers cannot work because the maximum sum of their digits is 9^{2} + 9^{2} + 9^{2} + 9^{2}. 324.

Three digit numbers have a maximum sum of digits of 9^{2} + 9^{2} + 9^{2}. 243.

If there is a three digit number that works, then it will have to be less than 243. The hundreds digit will be less than or equal to 2. Since the hundreds digit will have a very small effect on the overall sum of the squares of the digits, you can make sure that the tens and unit digits are large enough to have squares more than 100.

For that to happen, there can only be the following numbers in the tens and units digit: 6, 7, 8, and 9. Their squares are 36, 49, 64, and 81 respectively. Two of these numbers will be the tens and units digits.

Since the unit digit of the sum of the squares of the digits of the number have to equal 6, 7, 8, or 9, only the following pairs of squares work: (36 and 81), (49 and 49), and (64 and 64). These cases will be individually tested. Since they do not work, there are no valid three digit numbers.

This is all very intuitive, so it should be much simpler than my explanation.

Phi Li - 5 years, 6 months ago

Log in to reply

Yes that's better.

Kushagra Sahni - 5 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...