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!
 A: 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.
A: For this system one can find a general rational parametrization and
then N&S conditions for integer solutions.
Adding the pair:
$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!
A: 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).
A: 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)
