Example 3 Find all odd prime numbers $p$ for which 3 is a quadratic residue.
Solve: This is to find all odd primes $p$ such that $\left(\frac{3}{p}\right)=1$. By Theorem 5, we know
$$\left(\frac{3}{p}\right)=(-1)^{(p-1) / 2}\left(\frac{p}{3}\right)$$

It is evident that $p$ is an odd prime greater than 3. By
$$(-1)^{(p-1) / 2}=\left\{\begin{array}{ll}
1, & p \equiv 1(\bmod 4) \\
-1, & p \equiv-1(\bmod 4)
\end{array}\right.$$

and
$$\left(\frac{p}{3}\right)=\left\{\begin{array}{ll}
\left(\frac{1}{3}\right)=1, & p \equiv 1(\bmod 6) \\
\left(\frac{-1}{3}\right)=-1, & p \equiv-1(\bmod 6)
\end{array}\right.$$

we know that $\left(\frac{3}{p}\right)=1$ if and only if
$$p \equiv 1(\bmod 4), \quad p \equiv 1(\bmod 6) ;$$

or
$$p \equiv-1(\bmod 4), \quad p \equiv-1(\bmod 6)$$

From the system of congruences (10), we know that $p \equiv 1(\bmod 12)$, and from (11), we know that $p \equiv-1(\bmod 12)$. Therefore, 3 is a quadratic residue modulo $p$ if and only if $p \equiv \pm 1(\bmod 12)$. This implies that 3 is a quadratic non-residue modulo $p$ if and only if $p \equiv \pm 5(\bmod 12)$ (why).

For such a small number as 3, we can still use Lemma 2 directly, as in Theorem 3, to solve Example 3. Using the notation of Lemma 2, take $d=3$. We have
$$\begin{array}{ll}
1 \leqslant t_{j}=3 j3$, from the above discussion, we know
$$n=[p / 3]-[p / 6]$$

Therefore,
$$n=\left\{\begin{array}{ll}
{\left[\frac{6 k+1}{3}\right]-\left[\frac{6 k+1}{6}\right]=k,} & p=6 k+1, \\
{\left[\frac{6 k-1}{3}\right]-\left[\frac{6 k-1}{6}\right]=k,} & p=6 k-1
\end{array}\right.$$

Thus, we have
$$\left(\frac{3}{p}\right)=\left\{\begin{array}{ll}
1, & p \equiv \pm 1(\bmod 12) \\
-1, & p \equiv \pm 5(\bmod 12)
\end{array}\right.$$

This yields the same result as above. However, for larger numbers, using the quadratic reciprocity law is more convenient and less prone to errors.