solutions to special diophantine equations Let $0\le x,y,z,u,v,w\le n$ be integer numbers obeying
\begin{align*}
x^2+y^2+z^2=&u^2+v^2+w^2\\
x+y+v=&u+w+z\\
x\neq& w
\end{align*}
(Please note that the second equality is $x+y+v=u+w+z$ NOT $x+y+z=u+v+w$. This has lead to some mistakes in some of the answers below)
How can the solutions to the above equations be characterized. One class of solutions is as follows
\begin{align*}
x=&u\\
y=&w\\
z=&v
\end{align*}

This may not give all the solutions, but it does give a 3-parameter family. Choose positive integers $a,b,c,d$ such that $$a+b=c+d,\quad a+c<b<a+d,\quad2a<b$$ Then $$b^2+(b-a-c)^2+(a+d-b)^2=c^2+d^2+(b-2a)^2$$ and $$b+(b-2a)+(a+d-b)=c+d+(b-a-c)$$
