I am stuck proving the theorem that there exists $x$, $x^4 \equiv 2 \pmod p$ iff $p$ is of the form $A^2 + 64B^2$.
So far I have got this (and I am not sure if it's correct)
Let $p = a^2 + b^2$ be an odd prime,
- $\left(\frac{a}{p}\right) = \left(\frac{p}{a}\right) = \left(\frac{a^2 + b^2}{a}\right) = \left(\frac{b^2}{a}\right) = 1$
since $p \equiv 1 \pmod 4$
- $\left(\frac{a+b}{p}\right) = \left(\frac{(a+b)^2-2ab}{a+b}\right) = \left(\frac{2}{a+b}\right) = (-1)^{((a+b)^2-1)/8}$
using the Jacobi symbol and second supliment of quadratic reciprocity.
- $(a+b)^{(p-1)/2} = (2ab)^{(p-1)/4}$
since $(a+b)^2 \equiv 2ab \pmod p$
and the last step which I'm stuck on now is for $p = a^2 + b^2$ let $x^2 \equiv -1 \pmod p$ then $2^{(p-1)/4} = x^{ab/2}$. And I don't see how to prove the theorem with this result.