# Analysis of a quadratic diophantine equation

Hi! This is my first post on Math Overflow. I have two equations: $a(3a-1) + b(3b-1) = c(3c-1)$ and $a(3a-1) - b(3b-1) = d(3d-1)$. I'm trying to find properties of $a$ and $b$ that lead to solutions, where $a, b, c, d \in \mathbb{N}$. I'm having trouble applying any of the techniques in my abstract algebra book, as they mostly only apply to linear Diophantine equations.

So far, I only really have managed to deduce the following things:

$2b(3b-1) + d(3d-1) = a(3a-1) +b(3b-1)$

$2b(3b-1) = c(3c-1) - d(3d-1)$

$2b(3b-1) = (c-d)(3(c+d)-1)$

Any ideas on where to go from here would be greatly appreciated. Thanks!

-
Diophantine equations like this can be very tough. Elementary algebraic manipulations often get you nowhere (there is sometimes a trick but often not). Do you have any reason to believe the solutions to this equation are "nice" in any way? Here's one for your enjoyment: a=2167;b=1020;c=2395;d=1912 (if my computer got it right...) and I sort-of suspect there will be a sparse but infinite set of solutions. –  Kevin Buzzard Oct 25 '10 at 20:38
[indeed I sort-of suspect that one will be able to write down an infinite family of solutions, by first finding a rational pamaterisation of the intersection and then looking for integer points on it, but that it will take some work...] –  Kevin Buzzard Oct 25 '10 at 20:43
Finding the smallest example was Project Euler: Problem 44, see projecteuler.net/index.php?section=problems&id=44 –  Gerry Myerson Oct 25 '10 at 23:22
An earlier reference to this problem is on page 217 of Rabinowitz and Bowron, Index to Mathematical Problems, 1975-1979. It's attributed to Robert A Carman, School Science and Mathematics problem 3589. –  Gerry Myerson Oct 25 '10 at 23:28
Following the line of attack outlined in my answer (now deleted because it got downvoted so often) I have found several parametrized families on the surface; one of them is given by $(X,Y,Z,W) = (16u^5 + 16u^3 + 5u, 16u^4+12u^2+1, 16u^5 + 24u^3 + 7u, 16u^5 + 8u^3 - u).$ I have found infinitely many integral solutions of the original equation, though none yet in which a, b, c, d are all positive. –  Franz Lemmermeyer Oct 28 '10 at 9:00

One thing to do is to try to express these in terms of squares. Note that $$12x(3x-1)=36x^2-12x=(6x-1)^2-1$$ so that your equations become $$a_1^2+b_1^2=c_1^2+1$$ and $$a_1^2-b_1^2=d_1^2-1$$ where $a_1=6a-1$ etc. Then the variables $a_1$ etc are constrained to be congruent to $5$ modulo $6$.

Homogenizing these gives $$X^2+Y^2=Z^2+T^2$$ and $$X^2-Y^2=Z^2-T^2.$$ Searching for rational solutions of your equation is essentially looking for rational points on the intersection of these two quadrics in $\mathbf{P}^3$. In general the intersection of two quadrics in $\mathbf{P}^3$ is an elliptic curve, so it looks like your problem will boil down to something like finding the integer points on an elliptic curve.

Added There's a blunder in the above: I must thank Fedor for noticing that the second equation should be $$X^2-Y^2=W^2-T^2.$$ So the variety is the intersection of two quadrics in $\mathbf{P}^4$. Hartshorne mentions in passing that in general this construction gives a del Pezzo surface. Del Pezzo surfaces are rational so there should be a birational parametrizion (in terms of two affine parameters) of the rational solutions to the original pair of equations.

-
And if it does come down to finding integer points on an elliptic curve, then there won't be any "properties of $a$ and $b$ that lead to solutions," because there will only be finitely many solutions. –  Gerry Myerson Oct 25 '10 at 7:50
@Gerry Myerson: What? The points on an elliptic curve form an abelian group (once you fix a basepoint), which is often infinite. –  Dylan Thurston Oct 25 '10 at 8:14
Dylan, by Siegel's theorem there are only finitely many integer points on an elliptic curve with Weierstrass model over $\mathbb{Z}$. I admit that I haven't worked this problem through to the extent that I am certain it reduces to a problem of this nature, but I suspect it does. –  Robin Chapman Oct 25 '10 at 8:28
It looks like you lost some variable after homogenizing. It should be $X^2+Y^2=Z^2+T^2$, $X^2-Y^2=W^2-T^2$. –  Fedor Petrov Oct 25 '10 at 9:00
Ouch - then it's the intersection of two quadrics in $P^4$. I'm not sure what that is: maybe a del Pezzo surface? –  Robin Chapman Oct 25 '10 at 9:56

Completing the squares and setting $X = 6a-1$, $Y = 6b-1$, $Z = 6c-1$ and $W = 6d-1$ we find $$X^2 + Y^2 = Z^2 + 1, \quad X^2 - Y^2 = W^2 - 1.$$

Adding these equations we get $$2X^2 = Z^2 + W^2,$$ which we can parametrize by $$X = t^2 - 2tu + 2u^2, \quad W = t^2 - 4tu + 2u^2, \quad Z = t^2 - 2u^2.$$ This parametrization yields integral solutions as $t$ and $u$ run through ${\mathbb Z}$, although perhaps not all of them since these may have a common divisor.

Neglecting this problem for now we can plug this parametrization into $$2Y^2 = Z^2 - W^2 + 2$$ and get $Y^2 = 4ut^3 - 12u^2t^2 + 8u^3t + 1$, that is, $$(1) \qquad \qquad Y^2 = 4tu(t-u)(t-2u) + 1.$$

1. Brute Force A direct search for points on this surface yields several solutions; the solutions with $t < (2-\sqrt{2}\,)u$ give rise to values of $X$, $Y$, $-Z$, $W$ that are positive, and if $t \equiv 3 \bmod 6$ and $u \equiv \pm 1 \bmod 3$ these values are all $\equiv -1 \bmod 6$, hence yield positive integral solutions $(a,b,c,d)$ of our problem The two smallest out of more than a dozen found this way are $(t,u,a,b,c,d) = (9 , 85, 2167, 1020, 2395, 1912)$ and
$(t,u,a,b,c,d) = (51, 2506, 2051177, 415877, 2092912, 2008575)$.

This suggests that the diophantine problem has infinitely many solutions in positive integers. Proving this conjecture seems to be difficult, however.

2. Elliptic Surfaces

Since $Y$ must be odd, we can set $Y = 2y+1$ and get $$y^2 + y = ut^3 - 3u^2t^2 + 2u^3t = tu(t-u)(t-2u).$$ This is an elliptic surface, i.e., an elliptic curve over the field ${\mathbb Q}(u)$. Obvious rational points are $(t,y) = (0,0), (0,-1), (u,0), (u,-1), (2u,0), (2u,-1)$.

For transforming this into Weierstrass form, multiply through by $u^2$ and set $yu = z$, $tu = x$, giving $$z^2 + uz = x^3 - 3u^2x^2 + 2u^4x = x(x-u^2)(x-2u^2).$$ The six rational points we had found above now are $P_1 = (0,0)$, $-P_1 = (0,-u)$, $P_2 = (u^2,0)$, $-P_2 = (u^2,-u)$, $P_3 = (2u^2,0)$, $-P_3 = (2u^2,-u)$ Observe that $P_1 + P_2 + P_3 = 0$; the points $P_1$ and $P_2$ generate a subgroup of $E({\mathbb Q}(u))$ with rank $2$.

A simple calculation shows $$2(0,0) = (4u^6 + 3u^2, -8u^9 - 6u^5 - u),$$ $$2(0,-u) = (4u^6 + 3u^2, 8u^9 + 6u^5),$$ $$2(u^2,0) = (u^6 + u^2, u^9 - u),$$ $$2(u^2,-u) = (u^6 + u^2, -u^9),$$ $$2(2u^2,0) = (4u^6-u^2,-8u^9 + 6u^5 - u)$$ $$2(2u^2,-u) = (4u^6-u^2,8u^9-6u^5)$$ These points provide us with the following parametrized families of integral points on our surface: $$(X,Y,Z,W) = (u^5 + u, 2u^4 - 1, u^5 + 2u^3 - u, u^5 - 2u^3 - u)$$ $$(X,Y,Z,W) = (16u^5 + 16u^3 + 5u, 16u^4+12u^2+1, 16u^5 + 24u^3 + 7u, 16u^5 + 8u^3 - u)$$ $$(X,Y,Z,W) = (16u^5 - 16u^3 + 5u, 16u^4-12u^2+1, 16u^5-8u^3-u, 16u^5-24u^3+7u)$$ None of these give us solutions to our original equation, however.

3. The Fibonacci connection. Since $E$ has rank $2$ over the function field ${\mathbb Q}(u)$, the elliptic curves $E_u$ will have rank $\ge 2$ except for at most finitely many exceptions (the only one I noticed is $u = 1$). For some families of specializations, the rank may be higher. This is the case if we take $u = F_n$, the $n$-th Fibonacci number. In this family, we have a point independent from the $P_j$ listed above, which means they have at least rank $3$ (except for the finitely many exceptions mentioned before). The points (modulo typos) are $$Q = (F_{2n-2} F_{2n}, F_{2n-2} F_{2n}F_{2n+1})$$ if $u = F_{2n}$, and $$Q = (F_{2n-1}F_{2n+1}, F_{2n} F_{2n+1}^2)$$ if $u = F_{2n+1}$. While this does not seem to help us, I thought I'd mention it anyway since no one expects the Spanish inqui^H Fibonacci numbers in this problem.

-

For this system one can find a general rational parametrization and then N&S conditions for integer solutions.

$x^2 + y^2 = z^2 + 1$

$x^2 - y^2 = t^2 - 1$

gives:

$2 x^2 = z^2 + t^2$

which has a general rational parametrization (GPR):

$(z + t)/2 = (v^2 - 1) x / (v^2 + 1)$

$(z - t)/2 = 2 v x / (v^2 + 1)$

Adding these gives an expression for z and plugging this back in the first of the original pair then gives:

$(y/x)^2 - (1/x)^2 = 4 v (v^2 - 1)/(v^2 + 1)^2$ ( $= 4 R$ say)

which has GPR:

$y/x, 1/x = (L^2 + R)/L, (L^2 - R)/L$

and replacing $u := L (v^2 + 1)$ (to give an obvious simplification) yields a general rational solution of the original pair as:

$D = u^2 - v (v^2 - 1)$

$D x = u (v^2 + 1)$

$D y = u^2 + v (v^2 - 1)$

$D z = u (v^2 + 2 v - 1)$

$D t = u (v^2 - 2 v - 1)$

Homogenizing these by taking $u, v = a/c, b/c$ with $(a, b, c) = 1$, we now investigate how to specialize this to integer solutions.

First, $y$ is an integer iff $a^2 c - b (b^2 - c^2)$ divides $2 a^2 c$. Equivalently, there is an integer $L$ such that:

$b L (b^2 - c^2) = (L - 2) a^2 c$

Then two cases arise, depending on the parity of L.

## Case 1 L odd

We show that this is impossible (given the other constraints of the problem).

If $L$ is odd then $(L, L - 2) = 1$ and thus for some integer $n$ we have:

$a^2 c, b(b^2 - c^2) = L n, (L - 2) n$

Multiplying the equations for $z$ and $t$ by $2 a b$, and plugging the above pair into the result gives:

$2 a b z = a^2 (L - 2) + 2 b^2 L$

$2 a b t = a^2 (L - 2) - 2 b^2 L$

So letting $a, b = A e, B e$ with $(A, B) = 1$ implies the following, in which $2 L / A$ and $(L - 2) / B$ are integers:

$2 z = A (L - 2) / B + B (2 L / A)$

$2 t = A (L - 2) / B - B (2 L / A)$

For z, t to be integers we require $A (L - 2) / B$ and $B (2 L / A)$ to both odd or both even.

If they are both odd then A and $2 L / A$ must be both odd, which is impossible.

If they are both even then A even implies B odd and thus $2 L / A$ even, and A odd implies $(L - 2) / B$ even. So in either case this implies L even, contrary to hypothesis.

So that leaves us with ..

## Case 2 L even

Denoting $m := L / 2$ for convenience, we must how have for some integer $n$ :

$a^2 c, b(b^2 - c^2) = m n, (m - 1) n$ [*]

which, as in Case 1, implies:

$2 z = A (m - 1) / B + B (2 m / A)$

$2 t = A (m - 1) / B - B (2 m / A)$

Again $A (m - 1) / B$ and $B (2 m / A)$ must be either both odd or both even..

Both odd leads to the same contradiction as Case 1 as it requires $A$ and $2 m / A$ both odd.

So they must be both even, which is the case iff $A \equiv m \mod(2)$ (provided that when $m$ is odd, $(m - 1) / B$ is even, in other words $B$ does not divide out the power of 2 dividing $m - 1$).

Furthermore from the form of $z$, $t$, as $f \pm g$, they have the same parity. So adding and subtracting the original pair implies that $x, y$ are integers iff $z, t$ are integers.

Note that the above isn't an explicit integer solution. All I have done is reduce the problem to the pair [*], to which I have a draft solution that needs checking. But if anyone else wishes to nip in first with a solution to these then obviously feel free!

-
John, welcome to MO. This site supports TeX. I've gone through your answer and added dollar signs as I thought appropriate. I hope I didn't mess anything up. –  Gerry Myerson Oct 30 '10 at 22:38
Many thanks Gerry. It looks much clearer in TeX, and I'll use that in future replies. On checking the working I found that although broadly OK, it needed couple of minor corrections and an elaboration towards the end. (I hasten to add, this was unrelated to Gerry's cosmetic changes, but solely my sloppiness!) That's one of the great things about this Wiki system compared with usenet - One can go back and fix things. –  John R Ramsden Oct 31 '10 at 20:46

As Robin and Fedor observed the variety in question is a quartic Del Pezzo surface. There is a nice treatment in Igor Dolgachevs "Topics in classical algebraic geometry I" section 8.5 (including explicit rationalization, which is what you need).

-

You want positive integer solutions. Necessary conditions are that you can solve the first equation for c and the second for d. The discriminants must be squares, so

1+36*a^2-12*a+36*b^2-12*b = square1
1+36*a^2-12*a-36*b^2+12*b = square2

whereas one expects this to give an elliptic curve, it also allows for a quick and dirty computer search. Searching, I found quite a few integer solutions, but in the range 0 < a < 4001 and 0 < b < 4001 there was only one positive integer solution:

(a,b,c,d) = (2167,1020,2395,1912)

-
"one expects this to give an elliptic curve"---there is one too many free variables for the (complex) solution set to be a curve. It's the intersection of two quadrics in 4-space so it's some sort of surface (a Del Pezzo surface). –  Kevin Buzzard Oct 25 '10 at 21:20
This is NOT an elliptic curve. See Kevin and Fedors remarks. –  David Lehavi Oct 25 '10 at 21:27
mea culpa, its not an elliptic curve. I see also Kevin found the same positive integer solution, which I now know is the only one in the range 0 < a < 6001 and 0 < b < 6001. –  rita the dog Oct 25 '10 at 21:43
If you just look for integer solutions to $X^2+Y^2=Z^2+1$ and $X^2-Y^2=W^2+1$ with all variables at least 2, then you find loads and loads of small height, and they seem pretty random mod 6, so occasionally one might expect to run into a solution where they're all 5 mod 6 (e.g. $W=11471$ etc giving rise to the solution we independently spotted with $d=(W+1)/6=1912$ etc). There could have been a subtle reason why the congruence never occurred, but, given that it occurred once, surely the sensible money is on it occurring infinitely often. –  Kevin Buzzard Oct 25 '10 at 22:03