Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

A Number Digits Puzzle


Date: 02/23/2001 at 22:00:44
From: Nikhil Promise
Subject: Number Theory

Determine all positive integers with the property that they are one 
more than the sum of the squares of their digits in base 10.


Date: 02/26/2001 at 09:50:12
From: Doctor Rob
Subject: Re: Number Theory

Thanks for writing, Nikhil.

Let F(n) be one more than the sum of the squares of the digits of n. 
You can prove pretty easily that there are no numbers n with F(n) = n 
and d >= 4 digits, because d-digit numbers are at least 10^(d-1), but 
F(n) is at most d*9^2 + 1 = 81*d + 1, and for those d's,

     10^(d-1) > 81*d + 1.

This would imply that:

     n >= 10^(d-1) > 81*d + 1 >= F(n) = n

so n > n, a contradiction.

That just leaves 999 cases to consider. Now you can eliminate all 
three-digit numbers greater than 244, because:

     244 = 81*3 + 1 >= F(n) = n

That allows you to eliminate all three-digit numbers greater than
164, because the largest F(n) could be for n <= 244 is:

     F(199) = 1^2 + 9^2 + 9^2 + 1 = 164

That allows you to eliminate all three-digit numbers greater than 108, 
because:

     F(159) = 1^2 + 5^2 + 9^2 + 1 = 108

That allows you to eliminate all three-digit numbers, because:

     F(108) = 1^2 + 0^2 + 8^2 = 65

Obviously there are no one-digit numbers with F(n) = n, since the 
equation a^2 + 1 = a has no real roots.

That means that you are trying to solve

     a^2 + b^2 + 1 = 10*a + b

Multiply by 4, bring all terms over to the left-hand side, and 
complete the squares on a and b:

           4*a^2 - 40*a + 4*b^2 - 4*b + 4 = 0

     4*a^2 - 40*a + 100 + 4*b^2 - 4*b + 1 = 97

                   (2*a-10)^2 + (2*b-1)^2 = 97

Now there is just one way of writing the prime 97 as the sum of two 
squares. The even square must be (2*a-10)^2 and the odd square must be 
(2*b-1)^2, and that will tell you the possible values of a and b.

It looks as if there are just two solutions.

- Doctor Rob, The Math Forum
  http://mathforum.org/dr.math/   
    
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/