= Solution
The <quadratic reciprocity> states that for distinct odd <primes> $p,q$,
$$
\left(\frac pq\right)\left(\frac qp\right)=(-1)^{(p-1)(q-1)/4}.
$$
With $q=3$, it gives $\left(\frac3p\right)=(-1)^{(p-1)/2}\left(\frac p3\right)$. The nonzero square modulo three is one, so $\left(\frac p3\right)=1$ when $p\equiv1\pmod3$, and $-1$ when $p\equiv-1\pmod3$. An <odd prime> other than three is congruent to $1,5,7$, or $11$ modulo twelve. Evaluating the two signs gives
$$
\begin{array}{c|rrrr}p\bmod12&1&5&7&11\\\hline
(-1)^{(p-1)/2}&1&1&-1&-1\\
\left(\frac p3\right)&1&-1&1&-1\\
\left(\frac3p\right)&1&-1&-1&1
\end{array}
$$
Thus
$$
\boxed{\left(\frac3p\right)=1\text{ for }p\equiv\pm1\pmod{12},\quad -1\text{ for }p\equiv\pm5\pmod{12}.}
$$
Back to article page