# Thread: How can we show that one of these congruences hold?

1. Hey!!

We define the set $M:=\{x^2\mid x\in\mathbb{Z}\}$.

1. Give 8 different elements of M.
2. Give for each element of question 1, m, two numbers $q\in \mathbb{Z}, r\in \{0,1,\ldots , 7\}$ such that $m=8q+r$.
3. Show that for all $x\in M$ one of the following holds:
$x\overset{(8)}{\equiv}0$, $x\overset{(8)}{\equiv}1$, $x\overset{(8)}{\equiv}4$

I have done the following:
1. We have $1^2=1, 2^2=4, 3^2=9, 4^2=16, 5^2=25, 6^2=36, 7^2=49, 8^2=64$.
2. $1=8\cdot 0+1, 4=8\cdot 0+4, 9=8\cdot 1+1, 16=8\cdot 2+0, 25=8\cdot 3+1, 36=8\cdot 4+4, 49=8\cdot 6+1, 64=8\cdot 8+0$
3. How can we show that?

2.

3. Originally Posted by mathmari
We define the set $M:=\{x^2\mid x\in\mathbb{Z}\}$.

3. Show that for all $x\in M$ one of the following holds: $x\overset{(8)}{\equiv}0$, $x\overset{(8)}{\equiv}1$, $x\overset{(8)}{\equiv}4$
Hey mathmari!!

If $x\in M$, then there must be a $y\in\mathbb Z$ such that $x=y^2$ yes?

In question 2 we can see there seems to be a repeating pattern, don't we?
The remainers modulo 8 for consecutive values of $y$ are 1,4,1,0,1,4,1,0 after all.
That seem to be periodic with period 4, doesn't it?

Suppose we write $y=4k+r$ for some integer $k$ and $r\in\{0,1,2,3\}$.
What will be the possibilities for $y^2\pmod 8$?

Originally Posted by Klaas van Aarsen
Suppose we write $y=4k+r$ for some integer $k$ and $r\in\{0,1,2,3\}$.
What will be the possibilities for $y^2\pmod 8$?
Why do we take the y in this form? Because it is periodic of period 4?

The square is as follows:
$$y^2\mod 8\equiv 16k^2+8kr+r^2\mod 8\equiv r^2$$

The possible values of $r^2$ are $0,1,4,9=1$.

5. Originally Posted by mathmari
Why do we take the y in this form? Because it is periodic of period 4?
Yep.
It seems to be periodic with period 4, so we try to prove that it is indeed the case. And additionally what the possible remainders are.

Originally Posted by mathmari
The square is as follows:
$$y^2\mod 8\equiv 16k^2+8kr+r^2\mod 8\equiv r^2$$

The possible values of $r^2$ are $0,1,4,9=1$.
So?

6. Originally Posted by mathmari
Hey!!

We define the set $M:=\{x^2\mid x\in\mathbb{Z}\}$.

1. Give 8 different elements of M.
2. Give for each element of question 1, m, two numbers $q\in \mathbb{Z}, r\in \{0,1,\ldots , 7\}$ such that $m=8q+r$.
3. Show that for all $x\in M$ one of the following holds:
$x\overset{(8)}{\equiv}0$, $x\overset{(8)}{\equiv}1$, $x\overset{(8)}{\equiv}4$

I have done the following:
1. We have $1^2=1, 2^2=4, 3^2=9, 4^2=16, 5^2=25, 6^2=36, 7^2=49, 8^2=64$.
2. $1=8\cdot 0+1, 4=8\cdot 0+4, 9=8\cdot 1+1, 16=8\cdot 2+0, 25=8\cdot 3+1, 36=8\cdot 4+4, 49=8\cdot 6+1, 64=8\cdot 8+0$
3. How can we show that?
Look at your answers to (2)! Each has 8 times some number plus 1, 4, 1, 0, 1, 4, 1, 0.