about Pythagorean quadruples Respected Mathematicians, 
I would like to prepare a function, which will generate Pythagorean quadruples (a, b, c, d) = $d^2$ = $a^2$ + $b^2$ + $c^2$...-> (1). How far I am correct I don't know. For some set of integers a and b, consider $a^2$ + $b^2$ = m and d = c + ε. Now by (1), c = (m - $ε^2$)/2ε)....>(2) Now I will discuss the generation of such quadruples. 
For a is even and b is odd or b is even and a is odd;
(1) Let us take a = 12 and b = 15 then m = 369 = $3^2$ X 41
then ε = 1, $3^2$ but ε = 41 is not possible as $ε^2$ > m.
Now for c = 184 and d = 185 for ε = 1; for c = 16 and d = 25 when $3^2$ = ε;
So the primitive quadruples for a = 12 and b = 15 are (12, 15, 184, 185) and also (12, 15, 16, 25). 
(2) For a = 2 X 3 X 5 X 7 = 210 and b = $3^3$ X 5 = 135 then m = $3^2$ X $5^2$ X 277 = 62325 then ε = 1, $3^2$, $5^2$, $3^2$ X $5^2$. Other combination of ε are not possible due to $ε^2$ > m.
If I am correct with the cited examples, let me know the generalization of the Pythagorean quadruples. 
Note: I considered a and b have common factors $p_1$, ...$p_n$. 
Thanking you.
BABA

Let us only deal with primitive triples where the forms are
$A=2n+1\quad B=4n\quad CC=4n=1$. We begin with Euclid's formula shown here as $ \quad A=m^2-k^2,\quad B=2mk,\quad C=m^2+k^2.\quad$
Now we choose any odd number  greater that one $(15?)$ for the $A$-value and solve the $A$-function for $k$, testing a defined range of $m$-values to see which ones yield integers.
\begin{equation}
A=m^2-k^2\implies k=\sqrt{m^2-A}\qquad\text{for}\qquad  \lfloor\sqrt{A+1}\rfloor \le m \le \frac{A+1}{2}
\end{equation}
The lower limit ensures $k\in\mathbb{N}$ and the upper limit ensures $m> k$.
$$A=15\implies \lfloor\sqrt{15+1}\rfloor=4\le m \le \frac{15+1}{2} =8\\
\land\quad m\in\{4,8\}\implies k \in\{1,7\} $$
$$F(4,1)=(15,8,17)\qquad \qquad F(8,7)=(15,112,113) $$
Now we can use the same procedure to find new triples where $A=17$ or $A=113.\quad$ Doing so we find $F(9,8)=(17,144,145)\implies  15^2+8^2+144^2=145^2\quad $ ​or
$\qquad \quad F(57,56)=(113,6384,6385)\implies 15^2+112^2+6384^2=6385^2.$
The logic is that side $A$ of the new triple is replaced by $\sqrt{A^2+B^2}$ of the original triple, changing the new triple into a quadruple.
