Problem

Source: 2013 Saudi Arabia BMO TST II p5

Tags: number theory, Sum of Squares, Digits, Perfect Square



We call a positive integer good if it doesn’t have a zero digit and the sum of the squares of its digits is a perfect square. For example, $122$ and $34$ are good and $304$ and $12$ are not not good. Prove that there exists a $n$-digit good number for every positive integer $n$.