Let $m,n$ be integers. If one uses the division algorithm, show that $m^2-n^2$ can have any remainder term $r$, such that $0\le r\le 7$ after dividing by $8$.
I was able to show it for the case when the remainder equals zero, but got stuck after that. I'm not sure if I should write the proof case by case, or do a generalized proof.
TIA
Division algorithm gives $m=8k+r$ and $n=8s+t$ with $0 \leq r,s \leq 7$. Thus $m^2-n^2=8a+(r^2-t^2)$.
If $t=0$, then with $0 \leq r \leq 7$, we get the remainders $0,1,4$.
If $t=1$, then with $0 \leq r \leq 7$, we get the remainders $0, 7,3,4$.
Likewise we can get the remaining remainders.