# Determine if it is possible that the digits of $n^2$ are five different even digits.

Let $$n$$ be a positive integer greater than $$3$$.

(a) Determine if it is possible that the digits of $$n^2$$ are five different even digits.

(b) Determine all $$n$$ such that the digits of $$n^2$$ are different odd digits.

(b) If $$n$$ is odd then $$n = 2k+1$$, then we have $$n^2 = 4k^2 +4k+1$$ and hence $$n^2 = 1 \mod 4$$. Thus we have $$n = 1,3 \mod 4$$.

Thus $$n$$ always ends in either of $$1,3,5,7$$ or $$9$$.

But in that case the digit in ten's place of $$n^2$$ is always even, hence no such $$n$$ is possible.

I am stuck with part (a). Any hints are welcome.

• For $a$...have you tried a search? Note: I don't really understand what the rules are. Do you mean $n^2$ must be $5$ digits long and the digits are all distinct and even? Like $20468$ were it a perfect square? If so, just search.
– lulu
Feb 26, 2023 at 0:23
• For (a) you could say any such number would be $\equiv 2+4+6+8+0 \equiv 2 \pmod 3$ while squares are only $\equiv 0 \text{ or } 1 \pmod 3$ Feb 26, 2023 at 0:41
• @Henry: That's a great solution – worthy of an answer, I'd say :-) Feb 26, 2023 at 0:42

For (a) you could say any such number with the digits $$2,4,6,8,0$$ in some order
would be $$\equiv 2+4+6+8+0 \equiv 2 \pmod 3$$
while squares are only $$\equiv 0 \text{ or } 1 \pmod 3$$
• @user5210: It is possible, for example $8^2=64\equiv 1 \pmod 3$ or $78^2=6084\equiv 0 \pmod 3$ Feb 26, 2023 at 1:49