<s>[INST] Solutions for $a^2+b^2+c^2=d^2$ I have to find an infinite set for $a,b,c,d$ such that $a^2+b^2+c^2=d^2$ and $a,b,c,d\in\mathbb N$
I have found one possible set which is $x,2x,2x,3x$ and $x\in\mathbb N$
But I want another infinite sets and how to reach them because I have found my solution by hit and trial .
 [/INST] As you noticed, given a solution you can multiply it by any natural greater than $1$ to get another solution, so we can concentrate on solutions that do not have a common divisor.  You can just keep finding solutions by hand.  A more systematic approach is to write $a^2+b^2=d^2-c^2=(d+c)(d-c)$  The two terms on the right are either both odd or both even.  You can just choose $a,b$ with one odd and one even and $a \gt b$, then factor $a^2+b^2$.  So $a=4,b=1$ gives $d+c=17, d-c=1$ and you can solve the equations to get $d=9,c=8$ and a new solution is $4,1,8,9$.  You can always use the factor with $1$ giving $a,b,\frac 12(a^2+b^2-1),\frac12(a^2+b^2+1)$ as a fundamental solution whenever $a,b$ are of opposite parity.  If $a^2+b^2$ is not prime or the square of a prime there will be other solutions.  So for $a=8, b=1$ we have $a^2+b^2=65=5 \cdot 13$, and we find $8,1,4,9$ as a solution.So $a=4,b=1$ gives $d+c=17, d-c=1$ and you can solve the equations to get $d=9,c=8$.  Unfortunately here it give a permutation of the solution we already have.  If we choose $a=9,b=2$ we get $a^2+b^2=85=5 \cdot 17$ and find the solution $9,2,6,11$ as well as $9,2,42,43$
</s>