1

Proof: Suppose for the sake of contradiction, there is an integer a such that $a^2$ congruent $0 \pmod {4}$ and $a^2$ congruent $1 \pmod {4}$. Then $(a^2)-0=4k$ and $(a^2)-1=4l$ for some $k,l$ members of the integers. Now, $$a^2-0=4k$$ $$a^2=4k$$ Thus, $$a^2-1=4l$$ $$((4k)^2)-1=4l$$ $$(16k^2)-1=4l$$ $$(16k^2)-4l=1$$ $$2((8k^2)-2l)=1$$

$2m=1$ for some integer m where $m=(8k^2)-4l$ By the definition of an even integer $1$ is even, however we know $1$ is odd, therefore a contradiction.

Sil
  • 16,612
  • 3
    What you're supposed to show is that $a^2$ can't be 2 mod 4, and that it can't be 3 mod 4. – Gerry Myerson Oct 14 '17 at 08:42
  • 3
    Seems you have proven that $a^2\equiv 0\mod 4$ AND $a^2\equiv 1\mod 4$ cannot both hold. Was that the intent ? But to prove that there are no other possibilities, is not hard. We just have two cases for $a$, namely $a=2k$ or $a=2k+1$. Squaring and taking modulo $4$ gives the possible remainders $0$ and $1$. – Peter Oct 14 '17 at 08:43
  • Please learn how to use TeX/MathJax to format the mathematics. – md2perpe Oct 14 '17 at 09:03

2 Answers2

1

I feel the answers provided aren't clear or complete enough, so I'm going to put my two cents in. The proof is done by cases.

Case $1$: $a = 2k$ is even

By the definition of divisibility and congruence, $$a^2 \equiv 0\pmod4\impliedby 4\mid(a^2-0)\impliedby 4\mid(2k)^2\impliedby4\mid4k^2$$ and since $\exists\, c\hspace{0.1cm}: 4k^2 =4\cdot c$ with $c=k^2$, the statement is true.

Case $2$: $a=2k+1$ is odd

The second case is done almost exactly, except you're proving that $a^2 \equiv 1\pmod4$ holds for odd numbers, so instead of inputting $n$ as $2k$, you input it as $2k+1$. You will find that the witness $c$ for this case is $c = k^2+k$. You have proven $a^2$ is congruent to either $0$ or $1\pmod4$ for all $a$, thus the proof is considered complete. $\square$

-1

You only have to make a table of squares modulo $4$, which can be done readily since there are only $4$ congruence classes: $$\begin{array}{c|ccccc}a&0&1&2&3\\\hline a^2&0&1&0&1\end{array}$$

Bernard
  • 175,478