<s>[INST] integer solutions to $x^2+y^2+z^2+t^2 = w^2$ Is there a way to find all integer primitive solutions to the equation $x^2+y^2+z^2+t^2 = w^2$? i.e., is there a parametrization which covers all the possible solutions?
 [/INST] Bradley’s excellent paper on equal sums of squares gives the complete parameterization of the equation
$$
  x_1^2 + x_2^2 + x_3^2 + x_4^2 = y_1^2
$$
as
\begin{align}
   x_1 &= (uz+vy+wz)^2 -m^2(m^2+x^2+y^2+z^2-u^2-v^2-w^2) \\
   x_2 &= 2m(um^2+uz^2+xvm-ywm+xwz+yvz)  \\
   x_3 &= 2m(vm^2+vy^2+zwm-xum+zuy+xwy)  \\
   x_4 &= 2m(wm^2+wx^2+yum-zvm+yvx+zux)  \\
   y_1 &= (uz+vy+wz)^2 +m^2(m^2+x^2+y^2+z^2+u^2+v^2+w^2),
\end{align}
with the option of multiplying all terms by a common factor $l$. Note that each term is a homogeneous quartic expression in the seven [integer] parameters.
</s>