Division algorithm on $\langle m^2-n^2,8\rangle$

250 Views Asked by At

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

2

There are 2 best solutions below

4
On

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.

2
On

The squares modulo $6$ are $\{0,1,3,4\}$. It’s clear that you can get any residue mod $6$ as the difference of two of these.

The squares modulo $8$ are $\{0,1,4\}$. It’s clear that the only residues expressible as the difference of two of these are $\{0,1,3,4,5,7\}$.

For my money, this constitutes a proof.