# $10$-digit perfect squares that contain each of the digits $1, 2, 3, 4, 5$ twice

Are there any 10-digit perfect squares that contain each of the digits $1, 2, 3, 4, 5$ twice?

Perfect squares belong to the set $\{0, 1, 4, 7\}$ modulo $9$ and any such number will be equal to $3$ modulo $9$. Therefore such perfect squares do not exist.

Are there any other solutions?

• Of course you know why you chose $9$, otherwise you couldn't know why "any such number will be equal to $3$ modulo $9$". – J.R. Mar 26 '16 at 13:34
• Because, it's modulo is easy to examine and unchanging. – S.C.B. Mar 26 '16 at 13:35
• Can't you just say, Because I wanted to? – S.C.B. Mar 26 '16 at 13:40

The number $9$ has the property that $10^n \equiv 1 \pmod 9$ for all $n$, so a given digit makes the same contribution to the value of a number modulo $9$ regardless of its position. It's not hard to see that the only numbers for which this is true are $1$, $3$, and $9$. In our case, reducing modulo $1$ gives no information but reducing modulo $3$ does not lead to a solution of the above form, as the number is congruent to $0$ modulo $3$ and there are squares with this property. In summary, only the choice $9$ works here.
NB we can frame your solution as follows: Reducing gives that the $10$-digit number is congruent to $3$ modulo $9$, so the number is divisible by $3$ and not by $9$ and hence is not a square (as its prime factorization contains a single factor of $3$).