0

here are the instructions:
1) Prove that if $n$ is an even natural integer, then $n^2\equiv 0\pmod4$
2) Prove that if $n$ is an odd natural integer, then $n^2\equiv 1\pmod4$

1) If $n$ is even then it equals to $2k$ where $k \in \mathbb{N}$
$$4\equiv0\pmod4\Leftrightarrow4k^2\equiv0\pmod4 \Leftrightarrow(2k)^2\equiv 0\pmod4\Leftrightarrow n^2\equiv 0\pmod4$$
2) If $n$ is odd then it equals to $2k+1$ where $k \in \mathbb{N}$

According to 1), $2k\equiv 0\pmod4$. We also know that $1\equiv 1\pmod4$. Hence we have:
$$2k+1\equiv 1\pmod4 \Leftrightarrow (2k+1)^2\equiv 1\pmod4 \Leftrightarrow n^2\equiv 1\pmod4$$
Thanks in advance for taking your time reviewing my work.

Erulk
  • 15
  • The first one is correct, the second one is not. We do not necessarily have that $2k \equiv 0 \pmod 4$. Consider $k=1$, for example. In the first part, you showed that $(2k)^2 \equiv 0 \pmod 4$, not that $2k \equiv 0 \pmod 4$. – Dylan Nov 19 '15 at 19:16

2 Answers2

0

First part is correct.
However for second part, this is wrong.

$$2k \equiv 0 \pmod 4 \,\ \forall \,\ k \in \mathbb{N}$$

You should proceed like this:
Say $n=2k+1$
So $n^2=4k^2+4k+1=4k(k+1)+1=4m+1$
Hence $n^2 \equiv 1 \pmod 4$

0

The proof can be written with less clutter.

When $n=2k$, then $n^2=4k^2$, a multiple of $4$. So $n^2\equiv 0\ \pmod 4$.

For the second one, you have to expand the square.

If $n=2k+1$, then $n^2=(2k+1)^2=4k^2+4k+1=4(k^2+k)+1$. So $n^2$ is a multiple of $4$ plus $1$, i.e. $n^2\equiv 1\ \pmod 4$.

Martin Argerami
  • 205,756
  • Hi, welcome to Math SE. I don't mind if you do it or not for my answer, but usually in this site if you find something useful/interesting the suggestion is that you upvote it using the up arrow. The voting system is an essential part of the SE network. – Martin Argerami Nov 19 '15 at 19:37
  • Hi, I would like to but my votes aren't displayed yet ! – Erulk Nov 21 '15 at 10:11