# Standalone proof of a conditional part of Lagrange’s Four-Square Theorem?

Lagrange’s Four-Square Theorem — a special case of the Fermat-Cauchy Polygonal Number Theorem (FCPNT) — states that every natural number can be written as the sum of the squares of at most four integers.

I’m trying to find a new proof of a conditional version of part of that theorem:

Theorem: If $$n$$ is a natural number such that $$2n+1$$ can be written as the sum of the squares of four integers, then $$2n+1$$ can be written as the sum of squares of four integers which sum to $$1$$. In other words, one can always find integers $$t,u,v,w$$ such that \begin{align} 2n+1 &= t^2+u^2+v^2+w^2, \\ 1 &= t+u+v+w. \end{align}

The non-conditional version of this has been proven many times in the past (cf. Pollock, Cauchy, Bradley, etc.); but as far as I know, it has always been proven by first assuming the Fermat-Gauss theorem [that every natural number is the sum of at most three triangular numbers].

I’m hoping to find an elementary proof — existing or new — of this conditional result that doesn’t rely on any other part of the FCPNT. Any references or hints would be appreciated.

• How do you know that the proposition is true when it is not proved? Is it a conjecture? Do you have any computational arguments in support of your proposition? – SARTHAK GUPTA Jun 20 at 4:37
• @SARTHAKGUPTA: It has been proven, many times. So, yes, I know it’s true. The problem is, it is always proved by assuming the Fermat-Gauss theorem, and I’m trying to prove it “from scratch”. – Kieren MacMillan Jun 20 at 13:28
• @SARTHAKGUPTA: See, for example, the last page of Bradley’s article jstor.org/stable/3619945 – Kieren MacMillan Jun 20 at 13:48

The problem is equivalent to determine whether the Fourier coefficient of $$\Theta(q)=\sum_{ \begin{array}{cc} n_1,n_2,n_3,n_4\in\textbf{Z}\\ n_1+n_2+n_3+n_4=1 \end{array} }q^{n_1^2+n_2^2+n_3^2+n_4^2}$$ is always greater or equal to 1.
We can write equivalent $$n_4=1-n_1-n_2-n_3$$. Hence $$\sum^{4}_{j=1}n_j^2=$$ $$=1+2n_1+n_2^2+2n_2+2n_1n_2+2n_2^2+2n_3+2n_1n_3+2n_2n_3+2n_3^2=$$ $$=(n_1+n_2+n_3)^2+2(n_1+n_2+n_3)+n_1^2+n_2^2+n_3^2+1$$ Hence $$\Theta(q)=\sum_{ \begin{array}{cc} n_1,n_2,n_3,t\in\textbf{Z}\\ n_1+n_2+n_3=t \end{array} }q^{(t+1)^2+n_1^2+n_2^2+n_3^2}=$$ $$=\sum^{\infty}_{t=-\infty}q^{(t+1)^2}\sum_{ \begin{array}{cc} n_1,n_2,n_3\in\textbf{Z}\\ n_1+n_2+n_3=t \end{array} }q^{n_1^2+n_2^2+n_3^2}=$$ $$=\sum^{\infty}_{t=-\infty}q^{(t+1)^2}\sum^{\infty}_{s=0}q^s\sum_{ \begin{array}{cc} n_1,n_2,n_3\in\textbf{Z}\\ n_1+n_2+n_3=t\\ n_1^2+n_2^2+n_3^2=s\\ \end{array} }1.$$ But the equations $$n_1+n_2+n_3=t\textrm{, }n_1^2+n_2^2+n_3^2=s$$ have solutions $$n_1=\frac{1}{2}\left(-n_3+t-\sqrt{-2n_3^2+2s+2n_3t-t^2}\right)$$ $$n_2=\frac{1}{2}\left(-n_3+t+\sqrt{-2n_3^2+2s+2n_3t-t^2}\right)$$ and $$n_1=\frac{1}{2}\left(-n_3+t+\sqrt{-2n_3^2+2s+2n_3t-t^2}\right)$$ $$n_2=\frac{1}{2}\left(-n_3+t-\sqrt{-2n_3^2+2s+2n_3t-t^2}\right)$$ Hence if we set $$A(t,s)=\sum_{ \begin{array}{cc} n_1+n_2+n_3=t\\ n_1^2+n_2^2+n_3^2=s\\ \end{array} }1,$$ then, if the discriminant of $$n_1$$ and $$n_2$$: $$-2n_3^2+2s+2n_3t-t^2$$ is zero possess one double root $$(n_1=n_2)$$. Otherwise if $$-2n_3^2+2s+2n_3t-t^2=m^2$$, $$m\in\textbf{Z}^{*}$$ two different. Hence if $$s'=\left[\sqrt{s}\right]$$ is the floor of the square root of $$s\geq 0$$, we get $$A(t,s)=\sum_{ \begin{array}{cc} -s'\leq n_3\leq s'\\ -3n_3^2+2s+2n_3t-t^2=0 \end{array} }1+$$ $$+2\sum_{ \begin{array}{cc} -s'\leq n_3\leq s'\\ -3n_3^2+2s+2n_3t-t^2\neq 0 \end{array} }X_{\textbf{Z}}\left(\frac{1}{2}\left(-n_3+t+\sqrt{-3n_3^2+2s+2n_3t-t^2}\right)\right),$$ where $$X_{\textbf{Z}}(n)$$ is the characteristic function on integers.
By this way we get if $$r_0(t,2s)$$ is the number of representations of $$2s$$ in the form $$3x^2-2xt+t^2$$ and $$r_1(t,2s)$$ the number of representations of $$2s$$ in the form $$3x^2-2xt+m^2+t^2,$$ then $$r(t,2s)=r_0(t,2s)+2r_1(t,2s)=A(t,s)$$ is the Fourier coefficient of $$\Theta(q)=\sum^{\infty}_{t=-\infty}\sum^{\infty}_{s=0}A(t,s)q^{(t+1)^2+s}\textrm{, }|q|<1$$ If $$s-t=p$$, then $$2s=3x^2-2xt+m^2+t^2\Leftrightarrow 3x^2-2tx+t^2-2t+m^2=2p.\tag 1$$ We want to show that the above last equation have always integer solutions for every even non negative integer $$p\geq0$$ and for $$p$$ odd positive none. This will enable us to conclude, that the odd Fourier coefficients of $$\Theta(q)$$ are always occur and are non zero iff $$p$$ is even. For $$p$$ odd we have no representations. For this we define: $$\phi(q)=\sum^{\infty}_{n,t=-\infty}q^{3n^2-2tn+t^2-2t}$$ and assume the transformation $$n\rightarrow an+bt$$, $$t\rightarrow c n+d t$$, where $$a=-1$$, $$b=1$$, $$c=1$$, $$d=-2$$. Then $$ad-bc=1$$ and $$\phi(q)=2\sum^{\infty}_{n,t=-\infty}q^{n^2-2n+8 t^2+4t}.$$ Hence $$\phi(q)=2q^{-1}\left(\sum^{\infty}_{n=-\infty}q^{n^2-2n+1}\right)\left(\sum^{\infty}_{t=-\infty}q^{8t^2+4t}\right)=$$ $$=2q^{-1}\theta_3(q)\sum^{\infty}_{n=-\infty}q^{8n^2+4n},$$ where $$\theta_3(q)=\sum^{\infty}_{n=-\infty}q^{n^2}$$, $$|q|<1$$. Hence (1) have analog:
$$\phi(q)\theta_3(q)=\sum_{n,k,m\in\textbf{Z}}q^{3n^2-2nk+k^2-k+m^2}=2q^{-1}\theta_3(q)^2\sum^{\infty}_{n=-\infty}q^{8n^2+4n}=$$ $$=2q^{-1}\theta_3(q)^2\phi_e(q^2),$$ where $$\phi_e(q)=\sum^{\infty}_{n=-\infty}q^{4n^2+2n}$$. But $$\theta_2(q)=q^{1/4}\sum^{\infty}_{n=-\infty}q^{n^2+n}=q^{1/4}\sum^{\infty}_{n=-\infty}q^{4n^2+2n}+\sum^{\infty}_{n=-\infty}q^{(2n+1+1/2)^2}$$ and $$\sum^{\infty}_{n=-\infty}q^{(2n+1+1/2)^2}=\sum^{\infty}_{n=-\infty}q^{(2n+3/2-2)^2}=$$ $$\sum^{\infty}_{n=-\infty}q^{(2n-1/2)^2}=q^{1/4}\sum^{\infty}_{n=-\infty}q^{4n^2-2n}.$$ Hence $$\theta_2(q)=2q^{1/4}\sum^{\infty}_{n=-\infty}q^{4n^2+2n}$$ and therefore $$\phi(q)\theta_3(q)=q^{-3/2}\theta_3(q)^2\theta_2(q^2).\tag 2$$
Hence is equivalent to show that $$x^2+y^2+2z^2+2z=2p+1,\tag 3$$ have always solutions when $$p$$ is even non negative integer and none when $$p$$ positive odd. But indeed: $$2z^2+2z\equiv 0(4)$$ and when $$p$$ is odd we have no solutions since no integer of the form $$4n+3$$ have representation as a sum of two squares. Hence we left with case $$p$$ even.
The function $$f(z)=\theta_3(q)^2\theta_2(q^2)$$, $$q=e(z)=e^{2\pi i z}$$, $$Im(z)>0$$ is the associated theta function of (3) and is a modular form of weight $$3/2$$ in $$\Gamma(8)$$, i.e. it holds $$f\left(\frac{az+b}{cz+d}\right)=\epsilon_{c,d}(cz+d)^{3/2}f(z),$$ when $$Im(z)>0$$ and $$a,b,c,d$$ integers with $$ad-bc=1$$, $$a,d\equiv 1(8)$$, $$c,b\equiv 0(8)$$. The function $$\epsilon_{c,d}$$ is such that $$\epsilon_{c,d}^4=1$$. But I don't have much experience to go further.