# If $p=a^2+b^2$ prove these consequences about $\big(\!\frac{a}{p}\!\big)$

Suppose odd prime $$p=a^2+b^2$$, and $$a$$ is odd and $$b$$ is even. Prove that if $$b\equiv2\pmod4$$, then $$\left(\dfrac bp\right)=-1$$ and if $$b\equiv0\pmod4$$, then $$\left(\dfrac bp\right)=1$$.

What I have got is that $$p\equiv 1 \pmod4$$. I have tried factoring $$b$$ and splitting up the Legendre symbols. However, I am not sure this gets anywhere because you cannot say much about those. I have also observed that $$b \equiv 0 \pmod 4$$ when $$p\equiv 1 \pmod 8$$ and $$b \equiv 2 \pmod 4$$ when $$p\equiv 5 \pmod 8$$ if that helps.

• @twnly so "for each $q | b, p$ is a square $\bmod q$, then use quadratic reciprocity on $\prod_j (\frac{q_j}{p})^{e_j}$ – reuns Dec 1 '18 at 6:27
• @reuns is right, my proposed solution has some errors. I deleted them. – twnly Dec 1 '18 at 6:27
• is there some reason to expect there is no much simpler solution ? – reuns Dec 1 '18 at 6:31

Write $$b=2^rc$$ with $$c$$ odd. Then $$p=a^2+b^2\equiv a^2\pmod c$$ and so $$\left(\frac pc\right)=1$$ (this is a Jacobi symbol). As $$p\equiv1 \pmod 4$$ then $$\left(\frac cp\right)=1$$ (quadratic reciprocity for Jacobi symbols).
When $$p\equiv1\pmod8$$ then $$\left(\frac 2p\right)=1$$ and so $$\left(\frac bp\right)=\left(\frac 2p\right)^r\left(\frac cp\right)=1$$. When $$p\equiv5\pmod8$$ then $$\left(\frac 2p\right)=-1$$ and also $$r=1$$. Therefore $$\left(\frac bp\right)=\left(\frac 2p\right)\left(\frac cp\right)=-1$$.