# Find integral solutions - rational points of $4p=x^2+27y^2$ for $p>3$ prime

Let $p\geqslant 5$ be a prime. I want to solve $$4p=x^{2}+27y^{2} \tag{1}\quad x,y\in \Bbb N$$

This comes when considering the discriminant of a cubic polynomial $T^3 -pT-yp$ with cyclic group. Are there only elementary ways to find solutions? I only achieved a bit of it.

Firstly, since the right hand side of (1) must be even, so x and y have same parity.

If $p$ is prime, then $\mathrm{gcd}(p,6)=1\Rightarrow p=1,5\mod6$.

Using the hint. Case $p=5+6m$. If $x,y$ are even, let $x=2x',y=2y'$ so $5+6m=x'^{2}+27y'^{2}$. Then modulo 3, we get $2\equiv x'^{2}\mod3$, impossible. Thus $x,y$ are both odd. Let $x=2x'+1$ and $y=2y'+1$ so $6m=(x'^{2}+x')+23+27(y'^{2}+y')$. Modulo 3, this gives $x'^{2}+x'\equiv1\mod3$, without solutions in $\mathbb{F}_{3}$. Therefor, the equation (1) has no solution when $p=5+6m$.

So case $p=1+6m$. The equation (1) becomes $4+24m=x^{2}+27y^{2}$.

If $x,y$ are even, let $x=2x'$ and $y=2y'$. Then $1+6m=x'^{2}+27y'^{2}$. Since $x'^{2}-1=6m-27y'^{2}$, then $x$ and $y$ can be even only when $m\geqslant5\Leftrightarrow p\geqslant31$.

It follow that when $m\leqslant4$ that $x$ and $y$ are necessarily odd. Let $x=2x'+1$ and $y=2y'+1$. Then $6(m-1)=x'^{2}+x'+27(y'^{2}+y')$. Since $6(m-1)\leqslant18$, then $y'=0\Rightarrow y=1$. This gives $x'^{2}+x'=6(m-1)$. For example, $m=3\Leftrightarrow p=19$, then $12=x'+x'^{2}$ so $x'=3$ and $x=7$.

• $p=1 +6m$ is better to use than $p=1+3m$, and also $p=5+6m$ could not be solution. – Ahmad Jun 8 '17 at 12:36
• Thanks. Will try to work on this. – NevD Jun 8 '17 at 12:44
• It is a good deal easier to get a cyclic group from $$x^3 + x^2 + \left( \frac{1-p}{3} \right) x + c,$$ method of Gauss invented prior to Galois Theory math.stackexchange.com/questions/2022216/… – Will Jagy Jun 8 '17 at 19:51
• This gives me "meat" for the next week. Thanks for your help. – NevD Jun 8 '17 at 20:02

All primes $1 \pmod 3$ are integrally represented by $x^2 + xy + 7 y^2,$ shorthand $\langle 1,1,7 \rangle.$ Discriminant $-27.$

The primitive quadratic forms of discriminant $-108$ are $$\langle 1,0,27 \rangle, \; \; \langle 4,2,7 \rangle, \; \; \langle 4,-2,7 \rangle$$

Among primes $p \equiv 1 \pmod 3,$ we have $p = x^2 + 27 y^2$ whenever $2$ is a cubic residue $\pmod p.$

When $p \equiv 1 \pmod 3$ but $2$ is not a cube, we have $p = 4 u^2 + 2uv + 7 v^2.$ Then $$4p = 16 u^2 + 8uv + 28 v^2 = (4u+v)^2 + 27 v^2$$

Ireland and Rosen do this by cubic reciprocity. However, there is a short version with less detail: $$p = u^2 + uv + 7 v^2,$$ $$4p = 4 u^2 + 4 uv + 28 v^2 = (2u+v)^2 + 27 v^2.$$

• Googling "Ireland and Rosen" makes me feel that I should perhaps start with a book, if this helps me to understand your answer :) However, I updated my question with just very elementary considerations. Thanks. – NevD Jun 8 '17 at 19:23
• @NevD looking at your revised question, I do not see what you mean by "solve." What quantities in $4p = x^2 + 27 y^2$ are to be considered "given" and what are we then trying to find. Existence is guaranteed. Are you looking for an algorithm to find some specific number(s)? – Will Jagy Jun 8 '17 at 19:29
• $p$ is given, and I'm looking when/how one can find $x$ and $y$. – NevD Jun 8 '17 at 19:35
• @NevD look up Hardy Muskat Williams article, if you want to construct x,y. If you want to prove something without really knowing what $x,y$ turn out to be, that is different. more recent people.math.carleton.ca/~williams/papers/pdf/202.pdf – Will Jagy Jun 8 '17 at 19:42
• In fact, my first interest was to see how rational primes decomposes in $\Bbb Z[\zeta_3]$ with $p=\frac 12(x+y3\sqrt{-3})\frac 12(x-y3\sqrt{-3})$ – NevD Jun 9 '17 at 6:17