# How to show that either $a^2+5b^2=p$ or $c^2+5d^2=2p$ has integer solutions for all prime $p$ with $(\frac{-5}{p})=1$

How to show that either $a^2+5b^2=p$ or $c^2+5d^2=2p$ has integer solutions for all prime $p$ with $(\frac{-5}{p})=1$

would the fact that $\mathbb{Z}[\sqrt{-5}]$=$\mathcal{O}\cap \mathbb{Q}[\sqrt{-5}]$ has class number $2$ be any use.

• Is $\left(\frac {-5}p\right)$ the legendre symbol? Dec 20, 2013 at 18:06
• See my answer at math.stackexchange.com/a/1247186/448 Apr 22, 2015 at 20:22

Looking at the possible values of $a^2+5b^2 \pmod {5}$, we find that for any prime $p \neq 5$, $a^2 + b^2 = p \implies p \equiv 1,4 \pmod 5$ and $a^2 + b^2 = 2p \implies p \equiv 2,3 \pmod 5$

If $-5$ is a square modulo $p$, then $(p)$ splits in $\Bbb Z[\sqrt{-5}]$ into a product $\mathfrak p\bar{\mathfrak p}$, where $\mathfrak p$ has norm $p$.

Since $\Bbb Z[\sqrt{-5}]$ has class number $2$, we have that for any such prime,

$$Cl(\mathfrak p) = Cl(\Bbb Z[\sqrt{-5}]) \iff \exists y \in \Bbb Z[\sqrt{-5}], \mathfrak p = y\Bbb Z[\sqrt{-5}] \implies \\ \exists y \in \Bbb Z[\sqrt{-5}], p = N(y) \iff \exists a,b \in \Bbb Z, a^2+5b^2 = p \implies p \equiv 1,4 \pmod 5$$

and since the ideal $I = \langle 2, 1+\sqrt{-5}\rangle$ is a nonprincipal ideal of norm $2$, $I^2$ is principal, and :

$$Cl(\mathfrak p) = Cl(I) \iff Cl(I)Cl(\mathfrak p) = Cl(\Bbb Z[\sqrt{-5}]) \iff \exists y \in \Bbb Z[\sqrt{-5}], \mathfrak pI = y\Bbb Z[\sqrt{-5}] \implies \\ \exists y \in \Bbb Z[\sqrt{-5}], 2p = N(y) \iff \exists a,b \in \Bbb Z, a^2+5b^2 = 2p \implies p \equiv 2,3 \pmod 5$$

Once we realise that both the starting points and the ending points are mutually exclusive, and that the starting points cover all possible cases, we can replace the implications in the middle with equivalences.

Also, the only way for $a^2+5b^2$ to be even is to have $a$ and $b$ of the same parity. If you replace $a$ with $2c+b$, you obtain that for any integer $p$, $\exists a,b \in \Bbb Z, a^2+5b^2 = 2p \iff \exists b,c \in \Bbb Z, 2c^2+2bc+3b^2 = p$. This formulation is cleaner : it doesn't use the prime $2$ anymore (why use $2p$ rather than $3p$ or $7p$ or any other ?) and we are left with the two non-equivalent quadratic forms of discriminant $-20$

• thnaks. but I do not understand your solution. there are a lot points. for example, one point, i ll ask is: how do we use the discriminant? Dec 20, 2013 at 19:36
• @user104078 I don't use the discriminant to prove the claim. I'm only making a remark on how in can be stated more cleanly Dec 20, 2013 at 23:10
• thanks.please,another question:where does the ideal $I=\lt 2,1+\sqrt{-5}\gt$ come from? and, could you clarify the third implication of the second part (similary, the seond impliation of the fisrt part ) where $\exists y$ such that... Dec 20, 2013 at 23:50
• @user104078 : $I$ comes from stufying the ideal class group of $\Bbb Z[\sqrt{-5}]$. If you know it is of order $2$, you most likely know of one ideal that is not principal. Such as this one. The implications come from the fact that ideals have a norm, and if two ideals are the same, then they have the same norm. Dec 20, 2013 at 23:55
• thanks. for last: i do not totally undestand the part: $\mathcal{p}$=$y\mathbb{Z}[\sqrt{-5}]$. Dec 21, 2013 at 0:01

The fact that you state doesn't seem to be of any relevance to me.

A hint to a solution: What can you say about $-5$ when $\left(\frac{-5}p\right)=1$? And how can you use that to find integer solutions for $a^2+5b^2=p$?