If $a$ and $-a$ are both quadratic residues mod an odd prime $p$, then $p \equiv 1\pmod4$

131 Views Asked by At

If $a$ and $-a$ are both quadratic residues modulo an odd prime $p$, for $a \in \mathbb{Z}$ and $p\ \not\mid\ a$, then $p \equiv 1\pmod{4}$.

My guess is that was true and my reasoning was that with$$ \left(\frac{a}{b}\right) \equiv a^{\frac{p-1}{2}} \equiv 1 \pmod{p},\quad \left(\frac{-a}{b}\right) \equiv (-a)^{\frac{p-1}{2}} \equiv 1 \pmod{p}$$ both satisfied, we must have $p \equiv 1\pmod{4}$, but I am not too sure about this reasoning.

Would appreciate help!

1

There are 1 best solutions below

0
On BEST ANSWER

Just note that $ 1 \equiv (-a)^{\frac{p-1}{2}} \equiv (-1)^{\frac{p-1}{2}} a^{\frac{p-1}{2}} \equiv (-1)^{\frac{p-1}{2}} \bmod p $.