TITLE: If a and b are odd integers, then $8\mid (a^2-b^2)$
QUESTION [5 upvotes]: Prove: If $a$ and $b$ are odd integers, then $8\mid (a^2-b^2)$
So far I have: $$8\mid \left((2n+1)^2-(2m+1)^2\right)\Longleftrightarrow 8\mid \left(4n^2+4n+1-4m^2-4m-1\right) $$
Is this right so far? Where do I go from here? Step by step explanation please!

REPLY [3 votes]: Using the difference of squares formula $a^2-b^2=(a+b)(a-b)$ shows us that $$\begin{align}(2n+1)^2-(2m+1)^2 &= \bigl((2n+1)+(2m+1)\bigr) 
\bigl((2n+1)-(2m+1)\bigr)\\ &= (2n+2m+2)(2n-2m)\\ &= 4(n+m+1)(n-m).\end{align}$$ Now, use the fact that, for integers $n,m,$ we have that $n-m$ is even if and only if $n+m$ is even. (If you haven't seen this fact before, it's a nice exercise to prove.) Hence, exactly one of $n+m+1,n-m$ is even, and so....