I was going to break up $p$ into $8k+1$ and $8k+7$. Using this, I can plug that in for p and then solve using this.


Here is a proof that $\left( \frac{2}{p} \right) = (-1)^{(p^2-1)/8}$, which is basically what you are looking for:

Legendre symbol, second supplementary law

This says that $2$ is a quadratic residue $\bmod{p}$ if and only if $(p^2-1)/8$ is even. (Saying that $2$ is a quadratic residue is the same as saying that there is a solution to $x^2 \equiv 2 \pmod{p}$.) It is not difficult to check that: $(p^2-1)/8 = (p-1)(p+1)/8$ is even iff one of the factors $p-1,p+1$ is divisible by $8$.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.