Show that $8 \mid (a^2-b^2)$ for $a$ and $b$ both odd

HINT:

$k^2-j^2+k-j=(k-j)(k+j+1)$

As $(k+j+1)-(k-j)=2j+1$ which is odd, they must be of opposite parity, exactly one of them must be divisible by $2$

Method 2:

If $a,b$ are odd, observe that one of $(a-b),(a+b)$ is divisible by $4,$ the other by $2$

Method 3:

$(2a+1)^2=4a^2+4a+1=8\frac{a(a+1)}2+1\equiv 1\pmod 8$


Hint:

$$a^2 \equiv b^2 \equiv 1 \pmod8$$

When both $a$ and $b$ are odd.

$(2k+1)^2=4k^2+1+4k=4k(k+1)+1$, here either $k$ or $k+1$ is even.

Therefore $4k(k+1) \equiv 0 \pmod 8$