# seeking an integer parameterization for A^2+B^2=C^2+D^2+1

I'm looking for a complete [integer] parameterization of all integer solutions to the Diophantine equation

$A^2+B^2=C^2+D^2+1$,

analogous to the classical parameterization of the Pythagorean equation, i.e.

$A^2+B^2=C^2 \implies t,m,n \text{ such that } (A,B,C)=t(m^2-n^2,2mn,m^2+n^2)$.

Dickson's History contains many references and examples, but most appear to be inadequate, incomplete, or simply incorrect. Barnett and Bradley independently reached almost the same parameterization of the more general equation

$A^2+B^2+C^2=D^2+E^2+F^2$,

but I have so far been unable to reduce their parameterization(s) to one which solves the first equation I posted.

Any help or further references would be greatly appreciated.

Thanks! Kieren.

• $A^2 + B^2 = C^2 + D^2 + 1$ is equivalent to $$1 = (A^2-C^2) - (D^2-B^2) = (A+C)(A-C) - (D+B)(D-B).$$This identifies the set of solutions with the congruence subgroup of $\mathop{\rm SL}_2({\bf Z})$ consisting of matrices that reduce mod $2$ to either the identity or $({0\phantom.1\atop1\phantom.0})$. I don't know if there's a parametrization of this group available, but maybe enough is known about its elements for your needs. – Noam D. Elkies Aug 13 '12 at 15:49
• What exactly do you need a parameterization for? Writing down solutions is straightforward using the Euclidean algorithm, so if that's all you want to do... – Qiaochu Yuan Aug 13 '12 at 17:19
• Do you have a reference for Barnett or Bradley's parameterizations? – Zack Wolske Aug 13 '12 at 18:41
• Bradley: jstor.org/stable/3620159 Barnett: jstor.org/stable/2302941 – Kieren MacMillan Aug 13 '12 at 20:32

This is completely unrelated to my other answer. This class of problems is considered by L. N. Vaserstein in his 2006 Annals paper (preprint here): Polynomial parametrization for the solutions of Diophantine equations and arithmetic groups. Vaserstein appears to show that there is a polynomial parametrization (or at least a decomposition into polynomially parametrized sets) of integer solutions for this class of problems, but it ain't going to be pretty.

• This is interesting -- thanks! The solutions I've been working towards (as near as I've gotten them) are definitely not pretty, so this is at least validation, if not particularly encouraging. Thanks! Kieren. – Kieren MacMillan Aug 13 '12 at 20:28

Such a parametrization is not possible. Proof. Suppose A,B,C,D are polynomials with integer coefficients (in any number of variables) and A^2+B^2 = C^2+D^2+1. Then we have a parametrization for the congruence subgroup H of SL(2,Z) reducing to the permutation matrices modulo 2 (see Noam D. Elkies Aug 13 '12 at 15:49 above). This H appears in Example 14 in my Annals paper. The first rows in H are (A+C, B+D). Modulo 2, (A+C)(B+D) = 0, hence either A+C or C+D is always even. But those rows contain both (1,0) and (0,1). This is a contradiction. QED.

• So the proofs (and included parameterizations) by Bradley (jstor.org/stable/3620159) and Barnett (jstor.org/stable/2302941) are false? Or is it just not possible to reduce their general parameterization(s) $A^2+B^2=C^2+D^2+E^2$ to the special case $e = \pm1$? – Kieren MacMillan Jun 14 '14 at 21:29

• I'm afraid it only looks similar: $A^2+B^2=C^2+D^2$ is a homogeneous equation, so solutions amount to rational points on a surface (up to scaling), which are easily parametrized in this case (the surface is birational to ${\bf P}^1 \times {\bf P}^1$; whereas $A^2+B^2=C^2+D^2+1$ is integral points on a smooth threefold, so the underlying geometry is quite different. – Noam D. Elkies Aug 13 '12 at 16:58
• @Noam: I am fully aware of what you say, but notice that transforming this (essentially as you did, and as Matt Young did in the referenced question) into $(D+B)(D-B) = (A+C)(A-C) - 1$ allows one to generate all the solutions by letting $u=A+C, v = A-C$ and then $(D+B), (D-B)$ factors of $uv - 1$ (modulo some parity considerations) gives a quick way to generate solutions (but does not quite answer the question, I admit). – Igor Rivin Aug 13 '12 at 17:19

Though what any solution of the equation: $X^2+Y^2=Z^2+R^2+1$

Need to write. Though such.

$X=2t+1$

$Y=t-1$

$Z=2t$

$R=t+1$

$t,a,b$ any integer.

$X=b(a(a-1)b-1)$

$Y=a(a-1)b^2+1$

$Z=(a-1)b(ab+1)$

$R=ab((a-1)b-1)$

• Why are these all of the solutions? – Alex Degtyarev Nov 1 '14 at 19:40