Is this right? And how to prove it ?
For $n \equiv 1,2 \bmod 4$ $$ \Bigg|\ \mathbb Z^3\cap\Big\{(a_1,a_2,a_3)\ \Big|\ a_1^2+a_2^2+a_3^2=n \Big\}\Bigg| \\ = \frac12\Bigg|\mathbb Z^3\cap\Big\{(a_1,a_2,a_3)\ \Big|\ |a_1a_2|+|a_2a_3|+|a_1a_3|=n \Big\}\Bigg| $$ Here $|\cdot| $denotes the cardinality of a set.
Denote the left hand side quantity by $r(n)$. In other words, $r(n)$ means the number of ways $n$ can be written as sum of three square of integers.
My experiment on Mathematica is here. In the picture, the first generating function is the generating function for the expression by sumf of three squares. The second generating function is half of the generating function of pairwise product absolute sum.
Notice that when $n \equiv 1,2 \bmod 4$ the coefficients of $x^n$ of two functions (the generating function of both sides respectively) are equal.