In trying to solve the problem posed in this old message, I asked myself the following question :
Which sequences $(a_n)_{n\in\mathbb{N}}$ (with $\forall n\in\mathbb{N}\,,\,a_n\in\mathbb{Z}$) satisfy the following condition $(\star)$ :
$$\forall (i,j,k,\ell)\in\mathbb{N}^4\,,\, i^2+j^2=k^2+\ell^2\Longrightarrow a_i+a_j=a_k+a_{\ell}\,?$$
If $(a_n)$ satisfy $(\star)$, then equalities $(2t)^2+(t-5)^2=(2t-4)^2+(t+3)^2$ and $(2t+1)^2+(t-2)^2=(2t-1)^2+(t+2)^2$ show that for all $t$ in $\mathbb{N}$, $$(\mathscr{S}):\left\{\begin{array}{rcl} a_{2t}&=&a_{|2t-4|}+a_{t+3}-a_{|t-5|}\\ a_{2t+1}&=&a_{|2t-1|}+a_{t+2}-a_{|t-2|} \end{array}\right..$$ I don't know if this is useful, but I managed to prove that it means that the sequence $(a_n)$ satisfies the relation $$\forall t\in\mathbb{N}\,,\,a_{t+12}=a_{t+9}+a_{t+8}+a_{t+7}-a_{t+5}-a_{t+4}-a_{t+3}+a_t\,.$$ I wonder about the reciprocal. More precisely, given the integers $a_0$, $a_1$, $a_2$, $a_3$, $a_4$, and $a_6$, does the sequence $(a_n)$ defined by $(\mathscr{S})$ satisfy $(\star)$ ? I'm guessing the answer is yes, but I can't prove it.
In answer to the question about the implication $({\mathscr{S}}) \Rightarrow (\star)$ :
Suppose you are given six integers $a_0,a_1,a_2,a_3,a_4,a_6$. Then, there is an (obviously unique) sequence $(a_n)_{n\in{\mathbb N}}$ satisfying $(\star)$ and taking those initial values. In fact, mimicking the computation in Julian Rosen's linked answer, we obtain
$$ \begin{array}{lcl} a_n &=& \bigg(\frac{a_0}{3}+\frac{a_1}{2}+\frac{5a_2}{6}-\frac{a_3}{3}-\frac{a_4}{3}+\frac{a_6}{6}\bigg) \\ &=& + \bigg(-\frac{a_0}{30}-\frac{a_1}{40}-\frac{a_2}{120}+\frac{a_3}{40}+\frac{a_4}{30}+\frac{a_6}{120}\bigg) n^2 \\ &=& + \bigg(-\frac{a_0}{2}+\frac{a_1}{8}-\frac{5a_2}{8}+\frac{7a_3}{8}+\frac{a_4}{2}-\frac{3a_6}{8}\bigg) \chi_{2\mathbb Z}(n) \\ &=& + \bigg(\frac{2a_0}{3}-\frac{a_2}{3}-\frac{2a_4}{3}+\frac{a_6}{3}\bigg) \chi_{3\mathbb Z}(n) \\ &=& + \bigg(-\frac{a_1}{2}-\frac{a_2}{2}+\frac{a_3}{2}+a_4-\frac{a_6}{2}\bigg) \chi_{4\mathbb Z}(n) \\ &=& + \bigg(\frac{a_0}{5}+\frac{2a_1}{5}-\frac{a_2}{5}-\frac{2a_3}{5}-\frac{a_4}{5}+\frac{a_6}{5}\bigg) \left(\frac{n}{5}\right) \\ \end{array} $$
Next, let $(b_n)_{n\in{\mathbb N}}$ be any sequence taking those same initial values $b_0=a_0,a_1,a_2,a_3,a_4,a_6=b_6$ and satisfying $(\mathscr{S})$.
Using the first line of $(\mathscr{S})$ for $t=0$, we see that
$$ b_5=b_3+b_4-b_0=a_3+a_4-a_0=a_5 $$
Using the second line of $(\mathscr{S})$ for $t=3$, we see that
$$ b_7=2b_5-b_1=2a_5-a_1=a_7 $$
Using the first line of $(\mathscr{S})$ for $t=4$, we see that
$$ b_8=b_4+b_7-b_1=a_4+a_7-a_1=a_8 $$
Using the second line of $(\mathscr{S})$ for $t=4$, we see that
$$ b_9=b_6+b_7-b_2=a_6+a_7-a_2=a_9 $$
We have thus shown that $b_n=a_n$ for $0\leq n \leq 9$. When $n\gt 9$, $n$ can be written as $2t$ or $2t+1$ where $t\geq 5$, and for this $t$ we can remove the absolute values in $(\mathscr{S})$ : $(\mathscr{S})$ becomes
$$(\mathscr{S'}):\left\{\begin{array}{rcl} a_{2t}&=&a_{2t-4}+a_{t+3}-a_{t-5}\\ a_{2t+1}&=&a_{2t-1}+a_{t+2}-a_{t-2} \end{array}\right..$$
And it is clear that all those indexes on the RHS $2t-4,t+3,t-5,2t-1,t+2,t-2$ are all strictly smaller than $n$. It therefore follows by induction that $b_n=a_n$. So the two sequences $(b_n)$ and $(a_n)$ are the same, and hence $(b_n)$ satisfies $(\star)$ since $(a_n)$ does.