Solution
= Solution
Again set $\epsilon=(a/p)\in\{1,-1\}$. The <Euler criterion> applied to $\epsilon$ gives $\chi(\epsilon)=\epsilon^{(p-1)/2}$, as an equality of signs. If $p\equiv1\pmod4$, the exponent is even and the result is $1$; if $p\equiv3\pmod4$, it is odd and the result is $\epsilon$. Hence
$$
\boxed{\left(\frac{\left(\frac ap\right)}p\right)
=\begin{cases}1,&p\equiv1\pmod4,\\(a/p),&p\equiv3\pmod4.\end{cases}}
$$