Determine all possible values of a base ten positive integer N such that N is precisely one
more than the sum of the squares of its digits.
I've promised a solution. Here it goes:
- It is easy to show that only 2-digit numbers are eligible.
- Assume the number is 10*a+b
Then a^2+b^2+1 = 10*a+b
a*(10-a)-1=b*(b-1)
- From the above equation we can state:
-If a is a solution ,so is 10-a (symmetry)
-a is odd, since b*(b-1) is even
- Now we solve an equation b^2-b-k=0,
where k=a*(10-a)-1:
b=1/2*(1+sqrt(1+4*k)) , trying k=8, 20, or 25
(a=1 or 3 or 5)
- k=20 triggers b=5, a=3 and 10-a=7
- ANSWER: 35 and 75
)
Edited on September 4, 2011, 4:00 am