<s>[INST] Pythagorean Quadruples (Integer Question) We have $x^2+y^2+z^2=m^2$ with $x,y,z,m$ integers, $\gcd(x,y,z)=1$, $z$ is odd, $x$ and $y$ are even.
Set $x_1:=\frac{x}{2}$ und $y_1:=\frac{y}{2}$. We get
\begin{gather*}
x_1^2+y_1^2=\frac{1}{4}(x^2+y^2)=\frac{1}{4}(m^2-z^2)=\left(\frac{m+z}{2}\right)\left(\frac{m-z}{2}\right).
\end{gather*}
Set $f:=\gcd(x_1,y_1)$, $f_1:=\gcd(f,\frac{m+z}{2})$, $f_2:=\gcd(f,\frac{m-z}{2})$.
We can proof, that $\gcd(f_1,f_2)=1$ is true.
If $d=\gcd(f_1,f_2)>1$, then we have $d\mid f$, $d\mid \frac{m+z}{2}$, $d\mid \frac{m-z}{2}$ and consequently also $d\mid \frac{m+z}{2}-\frac{m-z}{2}=z$. Moreover we get $d\mid \frac{x}{2}$, especially $d\mid x$. Analog $d\mid y$, which creates a contradiction to $\gcd(x,y,z)=1$.
Set $x_2:=\frac{x_1}{f}$, $y_2:=\frac{y_1}{f}$, $z_1:=\frac{m+z}{2f_1^2}$ and $z_2:=\frac{m-z}{2f_2^2}$.
Can someone explain to me why $z_1$ and $z_2$ are integers?
I unterstand that for example $\frac{m+z}{2f_1}$ is an integer, but I don't understand why $z_1$ is an integer.
Thanks for your help.
 [/INST] Since $f_1|x_1,y_1$, we have
$$f_1^2\,|\,x_1^2+y_1^2\ =\ \left(\frac{m+z}2\right)\left(\frac{m-z}2\right)$$
and $f_1$ is coprime to $f_2$, hence also to $\frac{m-z}2$, so $f_1^2\,|\,\frac{m+z}2$.
</s>