Rachinsky quintets

The equation $a^2+b^2+c^2=d^2+e^2$ defines a quadric $Q\subset\mathbb{P}^4$, with a rational point $p=(1,0,0,0,1)$. Therefore it is rational : projecting from $p$, say on the hyperplane $e=0$, defines a birational map $Q --> \mathbb{P}^3$. The inverse of that map, namely $$ (x,y,z,t)\mapsto (x-\lambda ,y,z,t,\lambda )\quad \mbox{with }\lambda :=(x^2+y^2+z^2-t^2)/2x$$ gives a parametrization of all rational points in $Q$ with $x\neq 0$; to get integral points just multiply all coordinates by $2x$. To get the remaining points replace $p$ by $p'=(0,1,0,0,1)$, etc.


The following recipe (algorithm) generates all solutions. It may be viewed as a parametrization in a general(ized) sense.

W.l.o.g. we may assume that $c$ is odd. Then

$$ \left(\frac{x-y}2\right)^2 + \left(\frac{u-v}2\right)^2 + c^2 \ =\ \left(\frac{x+y}2\right)^2 + \left(\frac{u+v}2\right)^2 $$

where three conditions hold:

  1. $\ x\equiv y\equiv 1\ \mbox{mod}\ 2$
  2. $\ u\equiv v\equiv 0\ \mbox{mod}\ 2$
  3. $\ u\cdot v = c^2-x\cdot y$

i.e. we may take arbitrary $x$ and $y$ as in condition 1, and then one decomposes $c^2-x\cdot y$ (see condition 3), where $\ u\ v\ $ are as in condition 2; of course $\ 4\,|\,c^2-x\cdot y\ $ (and the expressions under the squares are integers).