If $p=a^2+4b^2$ for some $a,b \in \mathbb{Z}$, then $a$ is quadratic residu modulo $p$?

255 Views Asked by At

If $p=a^2+4b^2$ for some $a,b \in \mathbb{Z}$ and $p$ prime, then $a$ is quadratic residu modulo $p$?

Approach: I thought it was true. (I could't find a counterexample). So I tried to prove it. I deduced that $a$ is a quadratic residu modulo $p$ iff $b$ is. Second I deduced that $p\equiv 1 \mod 4$ and that $a$ is odd. Can someone give me a hint on how to finish the proof? Thanks.

2

There are 2 best solutions below

2
On BEST ANSWER

If $p=a^2+4b^2$ then $p\equiv 1\bmod{4}$ hence $$ \left(\frac{a}{p}\right)=\left(\frac{p}{a}\right)=\left(\frac{p-a^2}{a}\right)=\left(\frac{(2b)^2}{a}\right)=1. $$

1
On

We easily see that $p\equiv1\pmod4$, so for any prime factor $q\mid a$ we have, by quadratic reciprocity $$ \left(\frac pq\right)=\left(\frac qp\right). $$ OTOH we have $a^2=p-4b^2$. Therefore $$ p\equiv 4b^2=(2b)^2\pmod q $$ and $\left(\dfrac pq\right)=1$ for all those primes $q$.

So all the prime factors of $a$ are QRs modulo $p$. Therefore so is $a$.