<s>[INST] Relationships between the elements $(a,b,c,d)$ of a solution to $A^2+B^2+4=C^2+D^2$ I have reduced a certain equation (in positive integers) to the equation
$$A^2 + B^2 + 4 = C^2 + D^2. \quad(\star)$$
Assume the positive integers $(a,b,c,d)$ are any solution to $(\star)$. Are there any algebraic restrictions on [i.e., relationships between] the elements which are well-known or easy to prove? I'm thinking of things like Pythagorean means, or other relative size or congruence restrictions.
Thank you,
Kieren.
 [/INST] For the equation:  $X^2+Y^2+4=Z^2+D^2$
You can draw a simple formula.
$X=(2c+b+2)c+b$
$Y=(2c+b+2)c$
$Z=2c^2+bc-2$
$D=(2c+b+4)c+b$
more:
$X=\frac{(a^2-q^2)b}{2}+(b-2)(q-1)$
$Y=ab$
$Z=bq+2-b$
$D=\frac{(a^2-q^2)b}{2}+(b-2)q+2$
more:
$X=\frac{(a^2-q^2)b}{2}-(b+2)(q+1)$
$Y=ab$
$Z=b+bq+2$
$D=\frac{(a^2-q^2)b}{2}-(b+2)q-2$
$c,b,q,a$ - what some integers.
</s>