I have quite a problem, two methods, different results. something's wrong.
I'm trying to find under what conditions the Legendre symbol for $(\frac{3}{p})(\frac{-1}{p})=1$.
First Way: $(\frac{3}{p})(\frac{-1}{p})=(\frac{3}{p})\cdot(-1)^{(p-1)/2}$. For $p\equiv1\pmod4$, I get that $(\frac{3}{p})=(\frac{p}{3})$ and it is $1$ iff $p\equiv1\pmod3$ and $p\equiv1\pmod4$. Otherwise I get that $(\frac{3}{p})=-(\frac{p}{3})$ so it has to be that $p\equiv1\pmod3$, in order to get $-1\cdot -1 \cdot 1=1$. The Chinese remainder theorem tells me that the $p\equiv1,7 \pmod{12}$.
Second way (I believe that it is the problematic one but yet I can't see what's wrong): $\left(\frac{3}{p}\right)\left(\frac{-1}{p}\right)=\left(\frac{3}{p}\right)\cdot(-1)^{(p-1)/2}=\left(\frac{p}{3}\right)(-1)^{((p-1)/2)\cdot((3-1)/2)}\cdot(-1)^{(p-1)/2}=\left(\frac{p}{3}\right),$ this equals $1$ only for $p \equiv 1 \pmod 3$.
What's wrong with the second way? I believe it's all legal.
Thanks a lot!