# when p is sum of two square integer, prove (a/p) which is legendre symbol = 1

Let a,b be integers and p be an odd prime. if $p$=$a^2+b^2$ and a is odd, prove $(a/p)$ which is legendre symbol = $1$

what i have done is that :

because p and a are odd, b must be even and p is the form of $4k+1$ ($k$ is integer)

and after this, how to prove it ?

• It seems that $a$ and $b$ are both quadratic residues mod $p$ when $p\equiv 1 \bmod 8$. – lhf May 12 '16 at 2:30

It is enough to show that $(q/p)=1$ for any (necessarily odd) prime divisor $q$ of $a$.
By Quadratic Reciprocity, we have $(q/p)=(p/q)$. But since $a^2+b^2\equiv b^2\pmod{q}$, we have $((a^2+b^2)/q)=(b^2/q)=1$.
• I don't know, will think about it. Maybe one can get an argument using the continued fraction expansion of $\sqrt{p}$. Tried for something simple using Euler's Criterion, but could not push it through. – André Nicolas May 12 '16 at 2:49