SquareNumber MOD Basic

Problem - 4144

Show that if $n^2$ is a square number, then $n^2\equiv 0, 1, 4, 9\pmod{16}$.

In plain English, this means that the remainder can only be $0$, $1$, $4$ or $9$ when a square number is divided by $16$.


If $n\equiv 0\pmod{16}$, then $n^2\equiv 0\pmod{16}$.

If $n\equiv\pm 1\pmod{16}$, then $n^2 \equiv 1\pmod{16}$.

If $n\equiv\pm 2\pmod{16}$, then $n^2\equiv 4\pmod{16}$.

If $n\equiv \pm 3\pmod{16}$, then $n^2\equiv 9\pmod{16}$.

If $n\equiv \pm 4\pmod{16}$, then $n^2\equiv 16\equiv 0\pmod{16}$.

If $n\equiv \pm 5\pmod{16}$, then $n^2\equiv 25\equiv 9\pmod{16}$.

If $n\equiv \pm 7\pmod{16}$, then $n^2\equiv 49\equiv 1\pmod{16}$.

If $n\equiv 8\pmod{16}$, then $n^2\equiv 64\equiv 0\pmod{16}$.

report an error