## Same Four Digits

Find three consecutive odd whole numbers such that the sum of their squares is a four-digit number whose digits are all the same.
Source: mathcontest.olemiss.edu 7/16/2007

SOLUTION
Let $a$ be an odd whole number. Then, $a-2,a,a+2$ form three consecutive odd numbers.

Sum of squares
$\left (a-2\right )^2+a^2+\left (a+2\right )^2=\left (a^2-4a+4\right )+a^2+\left (a^2+4a+4\right )$
$=3a^2+8$

Since $a$ is odd, $a^2$ is odd. If $a^2$ is odd, then $3a^2$ is odd and if $3a^2$ is odd, then $3a^2+8$ is odd. So we will try different four-digit odd numbers starting from 1111, 3333, 5555, etc.

Guess and check
$3a^2+8=1111$
$3a^2=1103$
$a^2=1103\div 3=367.67$
Not a solution because $a$ is a whole number.

$3a^2+8=3333$
$3a^2=3325$
$a^2=3325\div 3=1108.33$ Not a solution.

$3a^2+8=5555$
$3a^2=5547$
$a^2=5547\div 3=1849$
$a=\pm\sqrt{1849}$
$a=43$

Check
$41^2+43^2+45^2=1681+1849+2025$
$=5555$