When is $-3$ a quadratic residue mod $p$?

1.5k Views Asked by At

Going over a past exam in my elementary number theory course, I noticed this question that caught my attention. The question asked for the conditions that allowed $-3$ to be a quadratic residue mod $p$. Doing some experimentation, I found that this was possible when $p \equiv 1 \pmod 3$. So I guess I have answered part of the question. But the proof is obviously nagging me:

Prove $-3$ is a quadratic residue in $\Bbb Z_p$ if and only if $p \equiv 1\pmod 3$.

I've done a bit of work on this, but haven't been able to come up with anything close to elegant nor conclusive. Any help would be appreciated.

2

There are 2 best solutions below

6
On

By quadratic reciprocity law we have $$\left(\frac{-3}{p}\right)=\left(\frac{-1}{p}\right)\left(\frac{3}{p}\right)\\=(-1)^{\frac{p-1}{2}}(-1)^{\frac{p-1}{2}\frac{3-1}{2}}\left(\frac{p}{3}\right)\\=\left(\frac{p}{3}\right)$$

Therefore $$\left(\frac{-3}{p}\right)=1\iff \left(\frac{p}{3}\right)=1\iff p\equiv1\pmod{3}$$

0
On

Here’s an argument that doesn’t depend on Quadratic Reciprocity.

First, for $-3$ to be a quadratic residue modulo $p$, that’s the same as having a $\sqrt{-3}$ in the field $\Bbb F_p$ with $p$ elements, i.e. $\Bbb Z/(p)$.

Second, $\sqrt{-3}\in\Bbb F_p$ if and only if $\Bbb F_p$ has all three cube roots of unity, since the nontrivial ones are $\frac{-1\pm\sqrt{-3}}2$.

Third, $\Bbb F_p$ has all three cube roots of unity if and only if $3$ divides $|\Bbb F_p^\times|=p-1$.

And finally, $3\mid(p-1)$ if and only if $p\equiv1\pmod3$.