I'd really love your help with the following problem: For prime $p$, $p= 5 (\bmod 8)$, and $a$ such that $(\frac{a}{p})=1$ (Legendre symbol): I need to show that $a^{(p-1)/4}$is either $1$ or $-1$ and that if it's 1, so $x=a^{(p+3)/8}$ is a solution for $x^2 \equiv a(\bmod p)$.
For the first part, Can I look on $x^4 \equiv 1(p)$, and tell that if $a^{(p-1)/4}$ is not 1 or -1 I get contradiction to Fermat theorem, but is it enough? This equation can have up to 4 solutions, what else should I use? I don't see how the other information helps.
From the information given I know that $x^2 \equiv 2 (\bmod p)$ is not solvable (Does it help?)
For the second part of the question, Isn't it just that $(a^{(p+3)/8})^2\equiv a^{(p-1)/4}a \equiv a \equiv a(\bmod p) $?
Thanks a lot.