# Three questions about the form $X^2 \pm 3Y^2 = Z^3$ and a related lemma

In Ribenboim’s Fermat’s Last Theorem for Amateurs, he gives the following lemma [Lemma 4.7, pp. 30–31].

Lemma. Let $E$ be the set of all triples $(u, v, s)$ such that $s$ is odd, $\gcd(u,v) = 1$ and $s^3 = u^2 + 3v^2$. Let $F$ be the set of all pairs $(t,w)$ where $\gcd(t, w) = 1$ and $t \not\equiv w\!\pmod{2}$. The mapping $\Phi : F \rightarrow E$ given by $\Phi (t, w) = (u, v, s)$ with \begin{cases} \, u = t(t^2−9w^2), \\ \, v = 3w(t^2-w^2),\\ \, s = t^2 + 3w^2, \end{cases} is onto $E$.

Q1: Am I understanding “onto” correctly by interpreting this to mean that this is a complete integer parameterization of the form $X^2 + 3Y^2 = Z^3$?

Q2: Is there a similar solution for the form $X^2-3Y^2 = Z^3$? It appears that \begin{cases} \, x = t(t^2+9w^2), \\ \, y = 3w(t^2+w^2),\\ \, z = t^2 - 3w^2, \end{cases} satisfies, but I want to be sure it’s complete.

Q3: Is this generalizable to the form $X^2 \pm kY^2 = Z^3$ for any [possibly non-square or squarefree] integer $k$?

• I will need to look at $x^2 - 3 y^2.$ Just as with general $k,$ once you no longer have class number $1$ things are less pleasant. For instance, in $x^2 + 11 y^2 = z^3,$ there are at least two necessary parametrizations, one with $z = u^2 + 11 v^2,$ but another with $z = 3 u^2 + 2 uv + 4 v^2.$ This happens largely because you have exponent $3$ and the class number is $3,$ the binary form mentioned has order three in the class group, which is cyclic order three. Suggest computer run finding $x^2 + 11 y^2 = p^3$ with $p$ prime. Some will be $p = u^2 + 11 v^2,$ some $p = 3 u^2 + 2 uv + 4 v^2.$ – Will Jagy Mar 26 '16 at 21:01
• @WillJagy: Thanks. In particular, I'm working with $k=6$ right now, i.e. $$X^2-6Y^2=Z^3,$$ in case that makes a difference. – Kieren MacMillan Mar 26 '16 at 21:44
• It is class number 2, so cubing does not do anything peculiar. However, the two classes are $x^2 - 6 y^2$ and $- x^2 + 6y^2,$ just the negatives of each other. If your form represents $p$ with $p > 0,$ it also primitively represents $p^3$ but not $-p^3.$ If it represents $-p,$ it primitively represents $- p^3.$ en.wikipedia.org/wiki/Brahmagupta#Pell.27s_equation – Will Jagy Mar 26 '16 at 21:49
• @WillJagy: How does Dickson's "complete solution in integers" to the equation $x^2-my^2=zw$ compare?projecteuclid.org/euclid.bams/1183485743 By which, I suppose, I mean to say: If Dickson's solution is integrally complete, can one not set $w=z^2$ or $z=w^2$ or $(w,z)=(u^2v,uv^2)$, and thus obtain a general solution to $X^2 \pm dY^2 = Z^3$? – Kieren MacMillan Mar 27 '16 at 2:36
• This notation is standard for all equations. artofproblemsolving.com/community/… – individ Mar 27 '16 at 4:28

The formula quoted in Ribenboim has the general form,

$$u^2+dv^2 = (p^3 - 3 d p q^2)^2 + d(3 p^2 q - d q^3)^2 = (p^2+dq^2)^3\tag1$$

Assume $\gcd(u,v)=1$. For $d=3$, apparently it is integrally complete.

But we cannot necessarily extend the same conclusion to general $d$. For example, for $d=11$, the formula above becomes,

$$(p^3 - 33 p q^2)^2 + 11(3 p^2 q - 11 q^3)^2 = (\color{blue}{p^2+11q^2})^3\tag2$$

The rational substitution $p,\,q = \frac{x+4y}{2},\;\frac{x}{2}$ transforms $(2)$ to,

$$(-4 x^3 - 15 x^2 y + 6 x y^2 + 8 y^3)^2 + 11(-x^3 + 3 x^2 y + 6 x y^2)^2 = (\color{blue}{3 x^2 + 2 x y + 4 y^2})^3\tag3$$

As W. Jagy pointed out, for $d=11$, the forms $x^2+11y^2,\;3 x^2 + 2 x y + 4 y^2$ are the desired sums. But for $p$ to be an integer, then $x$ has to be even which results in $\gcd(u,v)\neq1$. For $d=11$, then $(1)$ is only rationally complete.

For other $d$, say $d=47$, Pepin gave,

$$(13p^3 + 30p^2q - 42p q^2 - 18q^3)^2 + 47(p^3 - 6p^2q - 6p q^2 + 2q^3)^2 = 2^3(3p^2 + p q + 4q^2)^3\tag4$$

But now there is no rational substitution to transform $(1)$ to $(4)$. Thus, for certain $d$, then $(1)$ is not even complete rationally. (See also related posts: this and this.)

$\color{green}{Update:}$

As requested by OP, for $d=-6$, then formula $(1)$ yields,

$$(p^3 + 18 p q^2)^2 - 6(-3 p^2 q - 6 q^3)^2 = (p^2 - 6 q^2)^3\tag5$$

while this other formula, using initial $a,b,c = 5,\,2,\,1$ yields,

$$(5 r^3 - 36 r^2 s + 90 r s^2 - 72 s^3)^2 - 6(2 r^3 - 15 r^2 s + 36 r s^2 - 30 s^3)^2 = (r^2-6 s^2)^3\tag6$$

and there is no rational transformation between $(5)$ and $(6)$. Thus, for $d=-6$, then $(1)$ is not rationally complete also.

• If you include an examination/example of $d=-6$, I'll accept this answer. (Well, I'll probably accept it anyway… but $d=-6$ would be icing on the cake!) – Kieren MacMillan Mar 27 '16 at 0:28
• @KierenMacMillan: I was about to use this very example. – Tito Piezas III Mar 27 '16 at 1:27
• @KierenMacMillan: You didn't get me. :) I meant the very example can be used to prove that $(1)$ is not even rationally complete for $d=k=-6.$ – Tito Piezas III Mar 27 '16 at 1:41
• @KierenMacMillan: Hm, $d=2$ avoids the rules using $\text{mod}\; 8$ in this post. However, I just tested $(1)$ for $d=2$ and $u,v$ within an extensive range. It seems to be integrally complete. (Other small $d$ quickly show $(1)$'s incompleteness within that range.) – Tito Piezas III Apr 10 '16 at 1:46
• @KierenMacMillan: Testing $d=-2, -3$ with Mathematica quickly shows small solutions not covered by $(1)$. It's not even rationally complete for those two. – Tito Piezas III Apr 11 '16 at 15:42

Here are primitively represented cubes that do not require large $|x|, |y|,$ in $z^3 = x^2 - 6 y^2.$ Note the combinations: $-5 \cdot -23 = 5 \cdot 23.$

-18191447 =     -1 * 263^3   x: 1697   y: 1874
-9938375 =     -1 * 5^3 43^3   x: 329   y: 1294
-9938375 =     -1 * 5^3 43^3   x: 649   y: 1314
-5177717 =     -1 * 173^3   x: 23   y: 929
-4657463 =     -1 * 167^3   x: 1741   y: 1132
-3307949 =     -1 * 149^3   x: 451   y: 765
-1953125 =     -1 * 5^9   x: 1031   y: 709
-1030301 =     -1 * 101^3   x: 355   y: 439
-857375 =     -1 * 5^3 19^3   x: 289   y: 396
-857375 =     -1 * 5^3 19^3   x: 607   y: 452
-357911 =     -1 * 71^3   x: 1565   y: 684
-357911 =     -1 * 71^3   x: 383   y: 290
-148877 =     -1 * 53^3   x: 1237   y: 529
-148877 =     -1 * 53^3   x: 163   y: 171
-103823 =     -1 * 47^3   x: 1049   y: 448
-103823 =     -1 * 47^3   x: 131   y: 142
-24389 =     -1 * 29^3   x: 31   y: 65
-24389 =     -1 * 29^3   x: 625   y: 263
-24389 =     -1 * 29^3   x: 935   y: 387
-12167 =     -1 * 23^3   x: 1013   y: 416
-12167 =     -1 * 23^3   x: 283   y: 124
-12167 =     -1 * 23^3   x: 73   y: 54
-125 =     -1 * 5^3   x: 13   y: 7
-125 =     -1 * 5^3   x: 1477   y: 603
-125 =     -1 * 5^3   x: 149   y: 61
-125 =     -1 * 5^3   x: 19   y: 9
-125 =     -1 * 5^3   x: 203   y: 83
1 =     1    x: 1   y: 0
1 =     1    x: 485   y: 198
1 =     1    x: 49   y: 20
1 =     1    x: 5   y: 2
6859 =    19^3   x: 103   y: 25
6859 =    19^3   x: 215   y: 81
6859 =    19^3   x: 815   y: 331
15625 =    5^6   x: 131   y: 16
15625 =    5^6   x: 463   y: 182
15625 =    5^6   x: 847   y: 342
79507 =    43^3   x: 469   y: 153
79507 =    43^3   x: 509   y: 173
300763 =    67^3   x: 553   y: 29
389017 =    73^3   x: 1669   y: 632
389017 =    73^3   x: 761   y: 178
912673 =    97^3   x: 1327   y: 376
1520875 =    5^3 23^3   x: 1319   y: 191
1520875 =    5^3 23^3   x: 1529   y: 369
2685619 =    139^3   x: 1795   y: 299


To describe the solutions of the equation. $$x^2+qy^2=z^3$$

I think best would be to describe a solution using $3$ parameters.

$$x=p^6+q(b^2+8bs-5s^2)p^4+q^2(s^2-b^2)(b^2-8bs-5s^2)p^2+q^3(s^2-b^3)^3$$

$$y=2p(q^2(2s+b)(s^2-b^2)^2+2qb(b^2-3s^2)p^2-(2s-b)p^4)$$

$$z=p^4+2q(s^2+b^2)p^2+q^2(s^2-b^2)^2$$