7

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.

bob
  • 1,276
  • The concept of odd numbers do not exist modulo $p$ (unless $p = 2$), so the fact that $a$ is odd probably has no bearing on whether it's a quadratic residue modulo $p$. – Arthur Jun 25 '17 at 17:08
  • 4
    Use reciprocity:clearly $p$ is a square modulo $a$. –  Jun 25 '17 at 17:14
  • @franzlemmermeyer Many thanks! You have the same reasoning as Paolo Leonetti in the answer below. – bob Jun 25 '17 at 17:18
  • Are you asking only about $p$ prime? The Question would be better with this made explicit. – hardmath Jun 25 '17 at 17:42

2 Answers2

8

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$.

Jyrki Lahtonen
  • 140,891
  • I'm working on the same problem and I researched and found your solution, which in approach is the most similar to the way I went about trying to solve this problem. Could we discuss my attempt at a solution in chat? – no lemon no melon Mar 21 '21 at 19:19
7

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. $$

Paolo Leonetti
  • 15,554
  • 3
  • 26
  • 60
  • Yes yes!!! Many thanks! – bob Jun 25 '17 at 17:18
  • 2
    +1 Good job! You beat me to it, because I spent a few minutes thinking about how to do this without Jacobi symbols - largely because I don't remember Jacobi stuff in detail, so I had no choice :-) – Jyrki Lahtonen Jun 25 '17 at 17:22