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 \left({\bmod \, 5}\right) \implies x^2 \equiv y^2 \left({\bmod \, 5}\right)$$.

There are five cases to consider:


 * $$x \equiv 0 \left({\bmod \, 5}\right)$$: we have $$x^2 \equiv 0^2 \left({\bmod \, 5}\right) \equiv 0 \left({\bmod \, 5}\right)$$.


 * $$x \equiv 1 \left({\bmod \, 5}\right)$$: we have $$x^2 \equiv 1^2 \left({\bmod \, 5}\right) \equiv 1 \left({\bmod \, 5}\right)$$.


 * $$x \equiv 2 \left({\bmod \, 5}\right)$$: we have $$x^2 \equiv 2^2 \left({\bmod \, 5}\right) \equiv 4 \left({\bmod \, 5}\right)$$.


 * $$x \equiv 3 \left({\bmod \, 5}\right)$$: we have $$x^2 \equiv 3^2 \left({\bmod \, 5}\right) \equiv 4 \left({\bmod \, 5}\right)$$.


 * $$x \equiv 4 \left({\bmod \, 5}\right)$$: we have $$x^2 \equiv 4^2 \left({\bmod \, 5}\right) \equiv 1 \left({\bmod \, 5}\right)$$.

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 \left({\bmod \, 5}\right)$$ and $$8 \equiv 3 \left({\bmod \, 5}\right)$$, the result for $$7$$ and $$8$$ follows directly.