How to show that the square of an integer$\equiv 0,1,-1\pmod 5$?

736 Views Asked by At

How to show that the square of an integer$\equiv 0,1,-1\pmod 5$ ?

I know that every integer can be expressed as $3k$, $3k+1$, $3k+2$. I tried to solve this by squaring these expressions, but I am stuck. Previously I had solved another problem like this. There I was able to show that the square of an odd integer when divided by 8, leaves remainder 1.

5

There are 5 best solutions below

0
On

we know that $$x\equiv 0,1,2,3,4 \mod 5$$ thus we have by squaring $$x^2\equiv 0,1,4 ,9,16\equiv 0,1,-1,-1,1\mod 5$$

0
On

Simpler: $$x\equiv 0,\pm1,\pm2\mod5,\enspace\text{so}\quad x^2\equiv 0, 1, 4(\equiv -1)\mod 5.$$

0
On

Every integer can be expressed as $5a,5a\pm1,5a\pm2$ where $a$ is any integer

$(5a)^2=5\cdot5a^2$

$(5a\pm1)^2=5(5a^2\pm2a)+1$

$(5a\pm2)^2=5(5a^2\pm4a)+4=5(5a^2\pm4a+1)-1$

0
On

The trick is look at the remainders of numbers upon division by $5$. Each number has a remainder of either $0, 1, 2, 3,$ or $4$, but we're considering them modulo $5$, so $3-5=-2$ and $4-5=-1$ let's us square each of $0, \pm 1, \pm 2$, giving $0, 1,$ and $4\equiv -1$ modulo $5$, respectively.

Hence the square of any integer is congruent to either $0, 1,$ or $-1$ modulo $5$.

0
On

We know that: $a=bq+r$
Let $b = 5$. Also here, $r < b$. Therefore,
$a=5q \quad\qquad\Rightarrow\quad a^2=25q^2 \quad\qquad\qquad\Rightarrow\quad a^2=5m$ [for some integer m]
$a=5q+1 \quad\Rightarrow\quad a^2=25q^2+10q+1 \quad\Rightarrow\quad a^2=5m+1$ [for some integer m]
$a=5q+2 \quad\Rightarrow\quad a^2=25q^2+20q+4 \quad\Rightarrow\quad a^2=5m-1$ [for some integer m]
$a=5q+3 \quad\Rightarrow\quad a^2=25q^2+30q+9 \quad\Rightarrow\quad a^2=5m-1$ [for some integer m]
$a=5q+4 \quad\Rightarrow\quad a^2=25q^2+40q+16 \quad\Rightarrow\quad a^2=5m+1$ [for some integer m]

Hence from the results above, we can say that:
For any integer $n$,
$n \equiv 0,\pm 1$ (mod 5)