Solution
= Solution
<Euler's criterion> states that for $p\nmid a$,
$$
\boxed{a^{(p-1)/2}\equiv\left(\frac ap\right)\pmod p.}
$$
For a multiple of $p$, both the <Legendre symbol> and that positive <power function of a statistical test>[power] vanish modulo $p$, so the congruence extends to that case as well.