Square Modulo 5

Theorem
Let $x \in \Z$ be an integer.

Then one of the following holds:

Corollary
When written in conventional base $10$ notation, no square number ever ends in one of $2, 3, 7, 8$.

Proof
Let $x$ be an integer.

Using Congruence of Powers throughout, we make use of $x \equiv y \pmod 5 \implies x^2 \equiv y^2 \pmod 5$.

There are five cases to consider:


 * $x \equiv 0 \pmod 5$: we have $x^2 \equiv 0^2 \pmod 5 \equiv 0 \pmod 5$.


 * $x \equiv 1 \pmod 5$: we have $x^2 \equiv 1^2 \pmod 5 \equiv 1 \pmod 5$.


 * $x \equiv 2 \pmod 5$: we have $x^2 \equiv 2^2 \pmod 5 \equiv 4 \pmod 5$.


 * $x \equiv 3 \pmod 5$: we have $x^2 \equiv 3^2 \pmod 5 \equiv 4 \pmod 5$.


 * $x \equiv 4 \pmod 5$: we have $x^2 \equiv 4^2 \pmod 5 \equiv 1 \pmod 5$.

Proof of Corollary
The absence of $2$ and $3$ from the digit that can end a square follows directly from the above.

As $7 \equiv 2 \pmod 5$ and $8 \equiv 3 \pmod 5$, the result for $7$ and $8$ follows directly.