The proof my textbook gives doesn't make much sense to me.
It says,
$-1 \in QR_p \iff -1^{(p-1)/2} \equiv 1 \pmod p$, then says
If $p \equiv 3 \pmod 4$, then $(-1)^{(p-1)/2} \equiv -1 \neq 1 \pmod p$.
But if $p\equiv 1 \pmod 4$, then $(-1)^{(p-1)/2} \equiv 1 \pmod p$.
I'm not sure about those last two lines, why "If $p \equiv 3 \pmod 4$, then $(-1)^{(p-1)/2} \equiv -1 \neq 1 \pmod p$"?
Thanks!
If $p \equiv 3$ write $p=4k+3,$ then $p-1=4k+2, \ (p-1)/2=2k+1$ is odd, so raising $(-1)$ to that power gives $-1.$ The other case is similar.