Solution
= Solution
The <Legendre symbol> is
$$
\boxed{\left(\frac ap\right)=\begin{cases}0,&p\mid a,\\1,&a\text{ is a nonzero square modulo }p,\\-1,&a\text{ is a nonsquare modulo }p.\end{cases}}
$$
The distinction between the zero class and a nonzero <quadratic residue> is essential.