# Primes for which 2 and -2 are residues.

I know that 2 is a residue of primes of the form $8n+1$ and $8n+7$ and so on. I want to find a purely group theoretic or field theoretic proof of these statements.

For example, for 8n+1, the multiplicative group is of the order of 8 and so there exists an element of order 8, j. Then $(j + 1/j)^2 = 2$. Similarly for $8n+5$, there is an element of order 4, $i$ and if 2 had a residue, we could construct j such that $j^2 = i$ and therefore there is an element of order 8 which is impossible.

What I am not getting stuck on is finding something that differentiates a field of the order $8n+7$ from something of the form $8n+3$. This is how I proved the last 2 cases(there either exists or does not exist something of order 8).

-

## migrated from mathoverflow.netJul 19 '13 at 2:25

This question came from our site for professional mathematicians.

Is that a homework? – Mark Sapir May 31 '13 at 7:38
Voted to close. – Mark Sapir May 31 '13 at 8:59
The title asks about $-2$, the body doesn't. Anyway, voting to migrate to m.se – Gerry Myerson Jul 19 '13 at 0:26

If $p$ is an odd prime, then $8\mid p^2-1$, so when $p\not\equiv1\pmod8$ we have the element $j$ in the extension field $\mathbb{F}_{p^2}$. The zeros of the eighth cyclotomic polynomial are $$\phi_8(x)=x^4+1=(x-j)(x-j^3)(x-j^5)(x-j^7)=(x-j)(x-j^3)(x+j)(x+j^3).$$
We can say something extra about the minimal polynomial of $j$ over the prime field in these cases. This is because by the Galois theory of finite fields the other zero is the Frobenius conjugate $j^p$. So if $p\equiv 3\pmod 8$, then the minimal polynomial of $j$ is $$m(x)=(x-j)(x-j^3)=x^2-ax-j^4=x^2-ax-1.$$ The other factor of $\phi_8(x)$ modulo $p$ is then $m(-x)=x^2+ax+1$. Vanishing of the quadratic term $-2-a^2$ of $m(x)m(-x)$ implies that $a^2=-2$. But here $a=j+j^3=j-1/j$, so in this case you have $(j-1/j)^2=-2$.
On the other hand, if $p\equiv7\pmod8$, then $$m(x)=(x-j)(x-j^p)=(x-j)(x-j^7)=x^2+bx+j^8=x^2+bx+1.$$ Again the other factor is $m(-x)$, and we similarly see that $b^2=2$. This time you get $b=(j+j^7)=(j+1/j)$, and $(j+1/j)^2=2$.
Note that in both cases $j\pm 1/j$ is the trace of $j$, so an element of the prime field.