Prove that odd perfect square is congruent to $1$ modulo $8$ How can we prove that every odd perfect square is congruent to $1$ modulo $8$?
An odd perfect square is of the form $(2k+1)^2$.
$$(2k+1)^2=4k^2+4k+1=4(k^2+k)+1$$
Since $k^2+k=k(k+1)$ is always even, $4(k^2+k)$ is always divisible by $8$. Now it follows that every odd square is congruent to $1$ modulo $8$.

In general, for any integers $m,n$ such that $m$ is odd and $n&gt;2$, $m^{2^{n-2}}$ is congruent to $1$ modulo $2^n$. This follows directly from the fact that $U(\mathbb{Z} /2^n\mathbb{Z})\cong \mathbb{Z}_2\oplus \mathbb{Z}_{2^{n-2}} $.
Consider the group
$$(\mathbb{Z}/8\mathbb{Z})^\times = \{[1], [3], [5], [7]\} $$
under multiplication mod 8. Then
$$[1]^2 =[3]^2 = [5]^2 = [7]^2 \equiv 1 \, \,\mathrm{ mod } \, 8.$$
Since every odd integer is in exactly one of these congruence classes, every odd integer squared is 1 mod 8.