Prove that:
For every $A\in\mathbb Z$, there exist infinitely many $\{a_1,a_2,a_3,a_4\}\subset\mathbb Z$ given $a_m\neq a_n $ such that $$A^2=a_1^2+a_2^2-a_3^2-a_4^2$$
After many hours, I found a general formula satisfying the statement for all $A$ and $B$. $$A^2=(3A+B)^2+(9A+2B)^2-(5A+B)^2-(8A+2B)^2$$ This was derived by noticing the following pattern, to which I used the first equation below as a seed and multiplied through $A^2$. I was then able to find a second paramater $B$ due to the arithmetic progression of the pattern, in order to prove the infinitude of $\{a_n\}_{n=1}^{4}$. $$\begin{align}1^2+5^2+8^2 &= 3^2+9^2 \\ 1^2+6^2+10^2 &= 4^2+11^2 \\ 1^2+7^2+12^2 &= 5^2+13^2 \\ &\vdots\end{align}$$
My question is, is there a way one could prove the statement without the involvement of such curious patterns surrounding square numbers? Apologies if this question is somewhat vague.
Edit: Fun fact, it appears there is also a general formula for the equation $$A=a_1^2+a_2^2+a_3^2-a_4^2+a_5^2$$ That is, $$A^2=(A+B)^2+(A+3B)^2+(A+8B)^2-(A+5B)^2-(A+7B)^2$$
Edit 2: It appears that the first general equation at which I arrived in this question is actually part of an even more general equation $$(pq +s)^2=\big\{p(3q+r)+3s\big\}^2+\big\{p(9q+r)+3s\big\}^2-\big\{p(5q+r)+s\big\}^2-\big\{2p(4q+r)+4s\big\}^2+4pqs$$ where $(p,q,r,s)=(1,A,B,0)$. Note that an interesting fact implies when $p$, $q$ and $s$ are square numbers.
$a^2=a1^2+a2^2-a3^2-a4^2\tag{1}$
Let assume $p^2+q^2-r^2-s^2 = 1\tag{2}$
Equation $(2)$ has many parametric solutions.
We use one of the solutions, $(p,q,r,s)=(2n+1, n-1, n+1, 2n).$
( By consider two identies, $(n+1)^2 - (n-1)^2 = 4n, (2n+1)^2 - (2n)^2 = 4n+1$ )
$n$ is arbitrary.
Substitute $a1=pt+c, a2=qt+d, a3=rt+c, a4=st+d, a=t$ to equation $(1)$, then we get $$c=s-q$$ $$d=p-r.$$ Thus, we get a parametric solution below. \begin{eqnarray} &a& = t \\ &a1& = (2n+1)t+n+1 \\ &a2& = (n-1)t+n \\ &a3& = (n+1)t+n+1 \\ &a4& = 2nt+n \\ \end{eqnarray}
$t$ is arbitrary.
Example:
\begin{eqnarray} &(t)^2& = (3t+2)^2 + (1)^2 - (2t+2)^2 - (2t+1)^2 \\ &(t)^2& = (5t+3)^2 + (t+2)^2 - (3t+3)^2 - (4t+2)^2 \\ &(t)^2& = (7t+4)^2 + (2t+3)^2 - (4t+4)^2 - (6t+3)^2 \\ &(t)^2& = (9t+5)^2 + (3t+4)^2 - (5t+5)^2 - (8t+4)^2 \\ &(t)^2& = (11t+6)^2 + (4t+5)^2 - (6t+6)^2 - (10t+5)^2 \\ \end{eqnarray}