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?

The case $p=2,3$ is trivial, so suppose that $p\neq3$ is an odd prime with remainder $r$, when divided by three therefore by some observations we have
$$
\left(\frac{-3}p\right)=\left(\frac{-1}p\right)\left(\frac{3}p\right)=(-1)^{(\frac{p-1}2)}(-1)^{(\frac{p-1}2)(\frac{3-1}2)}\left(\frac p3\right)=(-1)^{p-1}\left(\frac p3\right)=\left(\frac p3\right)=\left(\frac r3\right)
$$
Which means that
$$
\begin {cases}
\left(\frac{-3}p\right)=1, & \text{iff $q\equiv1\pmod3$}\\
\left(\frac{-3}p\right)=-1, & \text{iff $q\equiv -1\pmod3$}
\end{cases}
$$
