# Legendre-Symbol, an easy example.

First I start with the important equivalence (Euler) due to the quadratic residue: $$(a|p) \equiv a^{\frac{1}{2}(p-1)} \pmod{p}$$ Having $(-2|p) = 1 \Leftrightarrow p\equiv 1 \text{ or },3 \pmod{8}$ I would like to know if I'm right with $$(-1|p) = 1 \Leftrightarrow p\equiv 1 \text{ or },5 \pmod{8}?$$ Am I right to consider that $$(I)\ \ (2|p) = (-1|p)\cdot(-2|p) = 1 \Leftrightarrow (-1|p)=(-2|p)=1 \text{ or } (-1|p)=(-2|p)=-1?(*)$$ If I am, so why is $$(2|p) = 1 \Leftrightarrow p \equiv \pm 1 \pmod{p}?$$ The case $p \equiv +1 \pmod{p}$ should be clear, the other should come from the equivalence above $(I,[\ldots] = -1)$. But I'm not sure about how exactly. I would be thankful for any kind of help!

-
This is part of my Number Theory lecture and I think the professor wants to show: With the knowledge of $(-2|p)$ and $(-1|p)$ we have $(-2|p)(-1|p) = (2|p)$ because of $-2 \cdot (-1) = 2$ and $(ab|p) = (a|p) \cdot (b|p)$. The last part of my question is the result that was concluded by the professor. So I think he mixed the conditions for $(-2|p)$ and $(-1|p)$ being $1$ to get the conditions for $(-2|p) = 1$. – gisma Jan 17 '13 at 16:26
Actually we have: $(-2|p) = 1$ iff $p \equiv 1 \pmod{8}$ or $p \equiv 3 \pmod{8}$ AND $(-1|p) = 1$ iff $p \equiv 1 \pmod{8}$ or $p \equiv 5 \pmod{8}$. My question is now: How did the professor get from this to the result mentioned in my posted question? It is reasonable that $$(2|p) = 1 \Leftrightarrow p \equiv +1 \pmod{p}$$. But where does the case – gisma Jan 17 '13 at 17:09
$$(2|p) = 1 \Leftrightarrow p \equiv - 1 \pmod{p}?$$ come from? – gisma Jan 17 '13 at 17:15
Okay, I'm sorry. It should be $\pmod{8}$ instead of $\pmod{p}$. – gisma Jan 17 '13 at 17:39
Would you like to explain me where the case $p\equiv -1\pmod{8}$ comes from? That was my question. The case $p\equiv 1\pmod{8}$ is reasonable for me. The other isn't. – gisma Jan 17 '13 at 17:42

Your question seems to be the following. Given that $(-2|p)=1$ iff $p\equiv 1$ or $p\equiv 3 \pmod{8}$, show that $(2|p)=1$ iff $p\equiv \pm 1\pmod{8}$.

Use the fact that $(2|p)=(-2|p)(-1,p)$. An odd prime is congruent to $1$, $3$, $5$, or $7$ modulo $8$.

If $p\equiv 1\pmod{8}$, then $(-2|p)=1$ and $(-1|p)=1$, giving $(2|p)=1$.

If $p\equiv 3\pmod{8}$, then $(-2|p)=1$ and $(-1|p)=-1$, giving $(2|p)=-1$.

If $p\equiv 5\pmod{8}$, then $(-2|p)=-1$ and $(-1|p)=1$, giving $(2|p)=-1$.

If $p\equiv 7\pmod{8}$, then $(-2|p)=-1$ and $(-1|p)=-1$, giving $(2|p)=1$.

It is common to write $p\equiv 7\pmod{8}$ in the equivalent form $p\equiv -1\pmod{8}$.

-
That's it! The way to get to the result. Thank you! :) – gisma Jan 17 '13 at 17:45