For all $x$ , $x^2 \equiv 0$ or $1$ or $4 \mod 7$ My textbook makes the following claim 

For any $x$ , $x^2 \equiv 0$ or $1$ or $4 \mod 7$

I can't see how this true though. $3^2 \equiv 4^2 \equiv 2 \mod 7$ so this obviously doesn't fall into the categories mentioned.
 A: (I had to add this as an answer to make it visible)
You're right, the proof is wrong, he doesn't consider that case. Maybe he didn't notice it because the only way that 
$$7\vert a, 7\vert b \Leftrightarrow 7\vert a^2+b^2$$
is considering that the only combination of the quadratic residues that solve the problem is when $a=7k$, $b=7q$ for $k,q\in \mathbb{Z}$. The proof is simple for $7\vert a, 7\vert b \Rightarrow 7\vert a^2+b^2$. For $7\vert a, 7\vert b \Leftarrow 7\vert a^2+b^2$ the only residues are $0,1,2,4$, so the only combinations you have are (without considering $0+0$, where both numbers are multiples of 7 and are solution for the iff):
$$0+1=1,0+2=2,0+4=4$$
$$2+2=4,2+4=6$$
$$4+4=8\equiv 1$$
Where anyone is congruent to zero. So the only way is considering $a,b$ multiples of 7.
A: Take the following cases (quite brute force actually).
By,Euclid's Division Lemma,
We know,any $x\in \mathbb Z$ is of the form $7k,7k+1,7k+2,...,7k+5,7k+6$.
Squaring the terms you get,
$(7k)^2\equiv0\pmod7$
$(7k+1)^2\equiv1\pmod7$
$(7k+2)^2\equiv4\pmod7$
$(7k+3)^2\equiv9\pmod7\implies(7k+3)^2\equiv2\pmod7$
$(7k+4)^2\equiv16\pmod7\implies(7k+4)^2\equiv2\pmod7$
$(7k+5)^2\equiv25\pmod7\implies(7k+5)^2\equiv4\pmod7$
$(7k+6)^2\equiv36\pmod7\implies(7k+6)^2\equiv1\pmod7$
Thus,you have the following cases.
Any $x^2\equiv0,1,2,4\pmod7$$(\forall\space x\in\mathbb Z)$
So,the book most probably missed the $2$ part,though it is a quite reputed book actually.
A: Note that it would become correct for modulo $8$ instead of $7$.
