<s>[INST] Find conditions for $\left(\frac{-3}{p}\right)=1$ $\left(\frac{-3}{p}\right)=\left(\frac{-1}{p}\right)\left(\frac{3}{p}\right)=\left(\frac{-1}{p}\right)\left(\frac{p}{3}\right)^{\frac{p-1}{2}}$   
$=\begin{cases}1,\:p\equiv 1\pmod{4}\text{ or }\begin{cases}p\equiv 3\pmod{4}\\p\equiv 2\pmod {3}\end{cases}\\-1,\:\text{otherwise}\end{cases}$
$p$ is an odd prime. Something is wrong here, since $\left(\frac{-3}{5}\right)=-1$, yet $5\equiv 1\pmod {4}$. What's wrong?
 [/INST] $$\left(\frac{-3}{p}\right)=\left(\frac{-1}{p}\right)\left(\frac{3}{p}\right)=\left(\frac{-1}{p}\right)\left(\frac{p}{3}\right)(-1)^{\frac{p-1}{2}}$$   
The problem is in your application of the quadratic-reciprocity law. 
</s>