[Lagrange's four square\_theorem](https://en.wikipedia.org/wiki/Lagrange's_four-square_theorem) states that every positive integer $N$ can be written as a sum of four squares of integers. At present, let's focus only on positive integer summands; that is, $N=a\_1^2+a\_2^2+a\_3^2+a\_4^2$ with $a\_i\in\mathbb{N}$.


If now mix-up sums and products, something rather curious happens: the greatest common divisor (gcd) becomes low-primed. I wish to know why.



> 
> **CLAIM.** If $n\geq26$ is an integer, then 
>  $$\text{GCD}\,\left\{a\_1a\_2a\_3a\_4\,: \, 4n+1=a\_1^2+a\_2^2+a\_3^2+a\_4^2 \,\,\, \text{and $a\_i\in\mathbb{Z}^{+}$}\right\}=2^b3^c$$
>  for some $b+c>0$.
> 
> 
> 


For example, \begin{align} 4(26)+1&=7^2+6^2+4^2+2^2=8^2+4^2+4^2+3^2 \\
&=8^2+6^2+2^2+1^2=9^2+4^2+2^2+2^2.
\end{align}
Therefore, the GCD equals $2^43^1$.



> 
> **UPDATED (later November 29, 2016).**
> 
> 
> 


I now have a more specific claim for the specific powers of $2$ and $3$, showing that even these numbers are low-powered.



> 
> **CONJECTURE.** Denote $a=a(n)$ and $b=b(n)$ the exponents $2^b3^c$ from above. Then,
>  $$b(n)=\begin{cases} 4 \qquad \text{if $n$ is even} \\
> 3 \qquad \text{if $n$ is odd}; \end{cases}$$
>  $$c(n)=\begin{cases} 0 \qquad \text{if $n=3k$} \\
> 2 \qquad \text{if $n=3k+1$} \\
> 1 \qquad \text{if $n=3k+2$}. \end{cases}$$
> 
> 
> 


*"It's easy for number theory to be hard." - anonymous.*



two's and three's survive in gcd of Lagrange
The claim is certainly true for $n$ sufficiently large, and "sufficiently large" could be specified explicitly with more care. 


We follow the suggestion of Fedor Petrov, and rely on the results of Brüdern & Fouvry (J. reine angew. Math. 454 (1994), 59-96) and of Heath-Brown & Tolev (J. reine angew. Math. 558 (2003), 159-224). These yield, for any prime $p\geq 5$, that if we count the representations $$4n+1=a\_1^2+a\_2^2+a\_3^2+a\_4^2$$ smoothly (with positive integers $a\_i$), then the proportion of representations such that $p\mid a\_1$ is at most $1/(p-1)+o(1)$ as $n\to\infty$, where $o(1)$ is uniform in $p$ (note that we can restrict to $p\ll n^{1/2}$). See especially Theorem 3 and Lemmata 6-7 in Brüdern & Fouvry, and the displays (340), (346), (349), (352) in Heath-Brown & Tolev. It follows that for $p\geq 7$ the proportion of representations such that $p\mid a\_1a\_2a\_3a\_4$ is at most $2/3+o(1)$, hence for $n$ sufficiently large (independent of $p$) there is a representation such that $p\nmid a\_1a\_2a\_3a\_4$. For $p=5$ we need to be more careful, because $4/(p-1)$ equals $1$ in this case, and subtract the (positive) proportion of representations such that two of the $a\_i$'s are divisible by $p$. This is also covered by the mentioned works as they discuss general divisibility constraints $d\_i\mid a\_i$.


