Search Problems   RSS Feed
projecteuler.net

Square Sum of the Digital Squares

 Published on Saturday, 8th December 2007, 05:00 am and solved by 3772
Difficulty: Level 17 [43%]

Problem 171

For a positive integer $n$, let $f(n)$ be the sum of the squares of the digits (in base $10$) of $n$, e.g.

$$\begin{align} f(3) &= 3^2 = 9,\\ f(25) &= 2^2 + 5^2 = 4 + 25 = 29,\\ f(442) &= 4^2 + 4^2 + 2^2 = 16 + 16 + 4 = 36\\ \end{align}$$

Find the last nine digits of the sum of all $n$, $0 \lt n \lt 10^{20}$, such that $f(n)$ is a perfect square.



Copied to Clipboard