<s>[INST] Legendre symbol of $(-2/p)$. Question. Show $(-2/p)$ equals $1$ when $p\equiv 1,3\bmod 8$ and $-1$ when $p\equiv 5,7\bmod 8$.
So using the multiplicativity of the symbol; we have $$\Big(\frac{-1}{p}\Big)\Big(\frac{2}{p}\Big),$$ and I know the rules for $(2/p)$ and $(-1/p)$. But then what? Usually I use Chinese remainder theorem to try and obtain a bigger modulus but I can't here since $8$ and $4$ aren't co-prime.
Edit. So to combine the congruences we have $$\Big(\frac{-2}{p}\Big)=1,$$ when $p\equiv 1\bmod 8$ and $p\equiv 3\bmod 8$ since we can't have $p$ being congruent to both $7$ and $5$ modulo $8$ at the same time.
Similarly, we have $$\Big(\frac{-2}{p}\Big)=-1,$$ when $p\equiv 7\bmod 8$ or $5\bmod 8$ because this is where the overlaps are when comparing $-1$ and $1$ from the results gained from $(2/p)$ and $(-1/p)$.
 [/INST] The proof that


*

*$\Big(\frac{-1}{p}\Big) = \begin{cases} 1 & \text{if } p \equiv 1 \pmod 4 \\ -1 & \text{if } p \equiv 3 \pmod 4 \end{cases}$ and

*$\Big(\frac{2}{p}\Big) = \begin{cases} 1 & \text{if } p \equiv \pm1 \pmod 8 \\ -1 & \text{if } p \equiv \pm3 \pmod 8 \end{cases}$


are classic.  The first bullet point becomes $\Big(\frac{-1}{p}\Big) = \begin{cases} 1 & \text{if } p \equiv 1,5 \pmod 8 \\ -1 & \text{if } p \equiv 3,7 \pmod 8 \end{cases}$.
Multiplying the two Legendre symbols gives
$$\Big(\frac{-2}{p}\Big) = \begin{cases} 1 & \text{if } p \equiv 1,3 \pmod 8 \\ -1 & \text{if } p \equiv 5,7 \pmod 8 \end{cases}.$$
</s>