# Sum of digits of squares

Printable View

• Feb 7th 2009, 10:58 PM
ADARSH
Sum of digits of squares
Hello all,
Q. How many numbers between 1-2000 , have sum of digits of respective squares as 21 ?
I am interested to know the working rather than the answer, Thanks to all(Talking)
• Feb 8th 2009, 06:30 AM
Opalg
Quote:

Originally Posted by ADARSH
Q. How many numbers between 1-2000 , have sum of digits of respective squares as 21 ?

The sum of the digits of a number is congruent to the number itself mod 9. So the sum of the digits of $n^2$ is congruent to $n^2$ mod 9. But a square has to be congruent to 0, 1, 4 or 7 (mod 9), and 21 is congruent to 3 (mod 9).

Conclusion: There are no numbers satisfying that condition.