Saturday, 18 October 2025

Exercise (1.2).2

Show that the square of any integer looks like $4m$ or $4m + 1$.


We'll use the Division Algorithm which guarantees that given integers $a$ and (divisor) $b \geq 1$, there exists unique integers quotient $q$ and remainder $r$ such that $a$ can be written as

$$a = qb + r  \quad \text{where} \quad 0 \le r < b$$

If we choose $b=4$, then $0 \le r < 4$, and we have

$$\begin{align} a^2 &= 4^2q^2 + 8qr + r^2 \\ \\ &= 4(4q^2 + 2qr) + r^2\end{align}$$

The integer $r$ can only be $0, 1, 2, 3$. Let's consider each case:

  • $r=0$ means $a^2 = 4(4q^2 + 2qr)$, of the form $4m$.
  • $r=1$ means $a^2 = 4(4q^2 + 2qr) + 1$, of the form $4m+1$
  • $r=2$ means $a^2 = 4(4q^2 + 2qr) + 4 = 4(4q^2 +2qr +1)$, of the form $4m$
  • $r=3$ means $a^2 = 4(4q^2 + 2qr) + 9 = 4(4q^2 + 2qr +2) + 1$, of the form $4m+1$

So the square of any integer is of the form $4m$ or $4m+1$ for some integer $m$.