# Prove that $3$ is a quadratic residue $\bmod p$ when $p\equiv\pm1 \pmod {12}$

Prove that $3$ is a $QR$ modulo $p$ when $p\equiv\pm1\pmod{12}$ and is a $QNR$ when $p\equiv\pm5\pmod{12}$.

I know that by Euler's Criterion, $3^{\frac{p-1}{2}}\equiv 1 \pmod p$ then $3$ is a $QR$, if $3^{\frac{p-1}{2}}\equiv-1\pmod p$, then $3$ is a $QNR$. Then I don't know how to continue the proof.

• Are you prepared to assume quadratic reciprocity? – Lord Shark the Unknown Oct 23 '17 at 3:11
• @LordSharktheUnknown Yes, I've learnt it but I'm not quite familiar with it. – jiqiudabao Oct 23 '17 at 3:19

The only elementary proof I know is in $\mathbb{Z}_p[i,\sqrt{3}]$.
Let $\zeta_3 = \frac{-1+i \sqrt{3}}{2}$ so that $\zeta_3^3 = 1,\zeta_3^2 = \frac{-1-i \sqrt{3}}{2}$ and $i\sqrt{3}= \zeta_3-\zeta_3^2$ thus $$\sqrt{3} \, 3^{(p-1)/2} \equiv \sqrt{3}^p \equiv (-i)^{p}(\zeta_3-\zeta_3^2)^p \equiv (-i)^{p}\zeta_3^p-(-i)^{p}\zeta_3^{2p} \bmod p$$ which clearly depends only on $p \bmod 3$ and $p \bmod 4$
where $(a+b)^p \equiv a^p+b^p \bmod p$ follows from the divisibility of binomial coefficients