# About the equation $x^2+y^2+z^2+2t^2=n$

The question

The final goal (for this stage of my project) is to get an explicit form for $$\phi(n)$$. This last one is the number of integer solutions to $$x^2+y^2+z^2+2t^2=n$$. You may find this $$\phi(n)$$ on OEIS or you can find the first several numbers by pasting the following code into something like mathematica:

CoefficientList[(1 + 2 Sum[q^(2(j)^2), {j, 10}] ) *(1 + 2 Sum[q^((j)^2), {j, 10}] )^3 , q]


The question is what's an explicit form for $$\phi(n)?$$

Exposition

I would like to get an explicit formula for $$\phi(n)$$. Let me tell you what I know so far. It looks like $$\phi(n)$$ is well-behaved on odd $$n$$ and on powers of $$2$$.

$$\chi(x)= \sqrt{2}\sin(\frac{\pi}{4}x+\pi)=\begin{cases} 1 \hspace{1 cm} \text{when }x \equiv 1,7 \mod 8 \\ -1 \hspace{1 cm} \text{when }x \equiv 3,5 \mod 8 \end{cases}$$

For $$n\equiv 1, 7 \mod 8$$ we have

$$\phi(n)=6\sum_{d|n} {\chi(d)}d$$

For example, $$33$$ is congruent to $$1 \mod 8$$ and indeed $$\phi(33)=6\times(1-3-11+33)=120$$

For $$n \equiv 3,5 \mod 8$$ we have

$$\phi(n)=-10\sum_{d|n} {\chi(d)}d$$

For powers of $$2$$ we have $$\phi(2^\alpha)=2^{\alpha+3}-2$$

I am using as a type of template here Joseph Liouville's Sur La Forme $$x^2+y^2+z^2+3t^2$$ and Sur La Forme $$x^2+y^2+z^2+5t^2$$. I am not able to complete the characterization and I am not $$100 \%$$ sure that Liouville does this for the forms above either(though I suspect he does) because I don't speak/read French very well (though math is math and this I can read). I can't find anything Liouville wrote on $$x^2+y^2+z^2+2t^2$$. If anyone knows that he surely did and can point me to the right spot I would appreciate it. Also if this is in Grosswald's text (which I don't own) I would definitely reconsider purchasing it. It's not clear to me from the TOC whether this is the right place to look. Also (and I sincerely doubt this one)... you know if Liouville is one of these mathematicians where everything has already been translated and I can find it English that would be amazing.

How do I finish the job and complete this characterization?

Motivations! What I think would be very cool would be to argue that $$\sum_{n=1}^R \phi(n)$$ is approximately the interior volume of $$x^2+y^2+z^2+2t^2=R$$ and thereby win a series of rational numbers that converges to the volume in the interior of $$x^2+y^2+z^2+2t^2=1$$ (which I would guess should be $$\frac{\pi^2}{2\sqrt{2}}$$? Correct me if I am wrong but this is kind of a minor detail.) I have explained that technique (perhaps ad nauseam) over here.

• @dmtri. I prefer something with mathematica over like mathematica. Can you explain why "like" is superior? Maybe: "by running the following code in mathematica:" is better? Otherwise, I really appreciate the edit. Thank you. – Mason Dec 29 '18 at 14:29
• Ken Williams, Number Theory in the Spirit of Liouville, cambridge.org/core/books/… has a chapter on your equation. – Gerry Myerson Dec 29 '18 at 14:40
• @GerryMyerson. Yay! Thanks so much. – Mason Dec 29 '18 at 14:41
• @Mason, you are right, I misunderstand your phrase.:) – dmtri Dec 29 '18 at 15:16
• @GerryMyerson. Absolutely. I am trying my best to wiggle through the paywalls. I am cheap/poor so if I can get this information by visiting UMD which isn't too far and not paying \$60 I will but anyway: I appreciate the lead. I probably won't get back to this project for another couple weeks. Winter Break allows for some play time but this is not a small project for me and I want to do good time-budgeting. – Mason Dec 30 '18 at 3:32

## 1 Answer

Letting $$\phi(n)$$ denote the number of integer solutions to $$x^2+y^2+z^2+2t^2$$, with $$n=2^{\alpha}N$$ where $$N$$ is odd we have $$\phi(n)=2\bigg( 2^{\alpha+2}\bigg( \frac{ 8}{N} \bigg)-1 \bigg) \sum_{d|N} \bigg( \frac{ 8}{d} \bigg)d$$

Where above appears Legendre-Jacobi-Kronecker symbols. In particular,

$$\bigg( \frac{8}{x} \bigg) = \cases{ \hspace{0.32 cm} 0 \text{ if } x \equiv 0 \hspace{.44 cm} (\mod 2) \\\hspace{0.32 cm} 1 \text{ if } x \equiv 1,7 (\mod 8) \\ -1 \text{ if } x \equiv 3,5 (\mod 8)}$$

An elementary proof can be found here.

So the next step in this process is to look for the asymptotic behavior of $$\sum_{n=1}^x \phi(n)$$ and see whether we can apply something like Abel's Summation here.