<s>[INST] 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*}
 [/INST] For the system of equations:  
$$\left\{\begin{aligned}&x^2+y^2+z^2=u^2+w^2+v^2\\&x+y+v=u+w+z\end{aligned}\right.$$  
You can record solutions:  
$$x=s^2+kt-ks+kq+ts-tq-qs$$  
$$y=s^2+kt+ks-kq-ts+tq-qs$$  
$$z=s^2+kt+ks-kq+ts-tq+2q^2-3qs$$  
$$u=s^2+kt+ks-kq+ts-tq-qs$$  
$$w=kt-s^2-ks+kq-ts+tq-2q^2+3qs$$  
$$v=kt-s^2+ks-kq+ts-tq+qs$$  
$s,q,k,t$ - integers asked us.
For not a lot of other systems of equations:
$$\left\{\begin{aligned}&x^2+y^2+z^2=u^2+w^2+v^2\\&x+y+z=u+w+v\end{aligned}\right.$$ 
Solutions have the form:
$$x=2s^2+(2q+2t+k)s+kt+qk+2qt$$
$$y=s^2+(q+k)s+qk+kt-t^2$$
$$z=s^2+(t+k)s+qk+kt-q^2$$
$$u=s^2+(q+t+k)s+qt+qk+kt$$
$$w=2s^2+(2q+2t+k)s+qt+qk+kt$$
$$v=s^2+ks+qk+kt-q^2-t^2$$
</s>