0
$\begingroup$

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

  • 0
    @OP Please do not change the question, especially *after* answers had been posted.2017-03-12
  • 0
    @dxiv sorry but the question posed did not have a possible solution.2017-03-12
  • 0
    It is frowned upon to substantially change a question after the fact, since everything posted already (answers, comments etc) no longer makes sense to later readers. FWIW the new question works out in a completely similar way to the posted answer.2017-03-12

2 Answers 2

1

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.

  • 0
    I understand how you got the squares modulo 6. Why does the difference of any two of these numbers complete the proof ?2017-03-12
  • 0
    $0=0-0, 1=1-0, 2=0-4,3=3-0,4=4-0,5=0-1$.2017-03-12
0

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.

  • 0
    how do you know which remainders you end up with for each case ?2017-02-13
  • 0
    @Nicole for example when $t=1$, then $r^2-t^2=r^2-1$. Now let $r$ run through $0 \to 7$. Say when $r=2$, then $r^2-1=3$. Thus we get the remainder $3$.2017-02-13
  • 0
    oh if i'm thinking correctly, since you can't have a negative remainder, in the case of t=1, r>=2?2017-02-13
  • 0
    how come for t=0, only 0,1, and 4 are remainders ?2017-02-13