# Prove that there are no natural numbers $x$ whose digits are $0$ or $2$, such that $x$ is a perfect square.

Prove that there are no natural numbers $$x$$ whose digits are $$0$$ or $$2$$, such that $$x$$ is a perfect square. I need some help here. I thought starting with $$x = n * 10^k$$ where $$10^k$$ represents the number of the zeros at the end of the number and $$n$$ is the group of digits which end with $$2$$ could help, but it didn't. Can anyone help?

• It might be more fruitful to decompose $y = n \cdot 10^k$ such that $10$ does not divide $n$, where $x = y^2$. Jan 18, 2019 at 1:29
• The last non-zero digit of a perfect square is always 1, 4, 5, 6, or 9. Jan 18, 2019 at 1:31

Dividing by an appropriate power of $$100$$ we can ensure that the final two digits are not both $$0$$. But a simple search (or congruence argument) shows that none of $$2,20,22$$ are squares $$\pmod {100}$$.