[Math] If $p$ is prime, then $x^2 +5y^2 = p \iff p\equiv 1,9 $ mod $(20)$.

algebraic-number-theoryelementary-number-theorynumber theoryquadratic-formsquadratic-residues

Let $p\neq 2,5$ be prime. I wish to show that: $x^2 +5y^2 = p \Leftrightarrow p\equiv 1,9 $ mod $(20)$.

I proved to $\Rightarrow$ part, means $x^2 +5y^2=p \Rightarrow p\equiv 1,9 $ mod $(20)$.

For $\Leftarrow$ , $p\equiv 1,9(20) \Rightarrow p\equiv 1(4)$ , $p\equiv1 ,4 (5)$ thus $(\frac{4}{p})=1,(\frac{-1}{p}) =1$ (using legendre symbols) , also $(\frac{5}{p})=_{p\equiv1(4)}(\frac{p}{5})$ and $p\equiv1(5)$ so $(\frac{5}{p})=1$ , so $(\frac{-20}{p})=(\frac{5}{p})(\frac{4}{p})(\frac{-1}{p}) = 1$. So $-20$ is a quadratic residue mod $p$.

Yet I don't succeed to go on from this point (I don't know even if its possible to do so).

Best Answer

An alternative solution: the class number of $K=\mathbb{Q}(\sqrt{-5})$ is $2$, its Hilbert class field is $L=\mathbb{Q}(\sqrt{-5},\sqrt{-1})$. A prime $p\neq 2,5$ can be written as $p=x^2+5y^2$, iff $p$ splits into two principal prime ideals in $K$, iff $p$ splits completely in $L$, iff $p$ splits in both $\mathbb{Q}(\sqrt{5})$ and $\mathbb{Q}(\sqrt{-1})$, iff $$\left(\frac{-1}{p}\right) = 1 \qquad \left(\frac{5}{p}\right)= \left(\frac{p}{5}\right) = 1$$ which happens iff $p\equiv 1,9 \pmod{20}$.


The solution using reduced binary quadratic form works here, because when $D=-20$ there are only one form $x^2+5y^2$ in the principal genus. This also happens for some other small $|D|$.