are there any elementary formula of $r'_3(n)$?

133 Views Asked by At

It is known that every positive integer can be written as sum of three squares if and only if the number cannot be expressed as $4^n(8k+7)$ for any non negative integers $n$, $k$ (Legendre's three squares theorem).

I have read about the function $r_3(n)$, which is the number of integer solutions to the equation: $$x^2+y^2+z^2=n$$ for every positive integer $n$. However this includes $0$ and negative solutions so I am finding a formula of $r'_3(n)$, that is the number of positive integer solutions to the equation: $$x^2+y^2+z^2=n$$ without arranging $(x,y,z)$.

So my question is: are there any elementary formula of this $r'_3(n)$ ?

Also, does there exist an integer $a<10^9$ that can be written as sum of three positive square numbers in at least $1000$ different ways without arrangement?. If not, how can we prove it?

(Sorry, English is my second language)

2

There are 2 best solutions below

1
On

Do you know the formulas for $r_3\left(n\right)$ and $r_2\left(n\right)$? These can easily be found online (see the link lower down in my answer). Then you can compute your $r'_3\left(n\right)$ by simple counting arguments. Begin with the $r_3\left(n\right)$ expressions of $n$ as the sum of three squares. Subtract $6\left(r_2\left(n\right) - r_1\left(n\right) - r_1\left(\frac{n}{2}\right)\right)$ (define $r_1\left(\frac{n}{2}\right) = 0$ if $n$ is odd of course). This subtraction corresponds to getting rid of each expression of $n$ as the sum of the squares of two distinct integers plus zero squared - do you see why? Then finally subtract $3r_1\left(\frac{n}{2}\right) + 3r_1\left(n\right)$ for each expression of $n$ as two of the same square and each expression of $n$ as a square. So I think $$r'_3\left(n\right) = \frac{1}{8}\left(r_3\left(n\right) - 6r_2\left(n\right) + 3\left(r_1\left(n\right) + r_1\left(\frac{n}{2}\right)\right)\right).$$ The division by $8$ here makes sense since the expression in the brackets corresponds to solutions with all variables non-zero, and each solution in positive integers corresponds to exactly $8$ solutions in non-zero integers. I'm using $r_1$ instead of a more familiar symbol for (double) the characteristic function of the squares to indicate the nested nature of these sums of squares.

Now, I'm not totally confident in my combinatorics here, but my point is that reducing from $r_3\left(n\right)$ to $r'_3\left(n\right)$ doesn't count on any deep mathematics. However, the formula for $r_3\left(n\right)$ does. If you haven't seen it already, check out the info on this page:

http://mathworld.wolfram.com/SumofSquaresFunction.html

As far as your second question, I'm not sure. There are lower bounds satisfied by infinitely many $n \in \mathbb{N}$, but to achieve a large value under $10^9$, they won't help, as I don't think the infinite set of such $n$ satisfying these lower bounds is explicit.

1
On

Short answer: the formula $(37)$ here gives a relation between $r_3(n)$ and the class number $h(-n)$, which on its turn can be computed through Kronecker's formula $(2)$ and is related to the value at $s=1$ of a Dirichlet $L$-function. Still manageable, but not as simple as $r_2(n)$ or $r_4(n)$.

On the other hand the fact that $r_3'(n)$ is unbounded can be proved in a completely elementary fashion. Assume by contradiction that $r_3'(n)\leq K$. For any $a,b,c\in[N+1,2N]$ we have $a^2+b^2+c^2\in[3N^2+1,12N^2]$, so $$ \sum_{k=3N^2+1}^{12N^2}r_3'(k) \geq N^3 $$ which contradicts $$ \sum_{k=3N^2+1}^{12N^2}r_3'(k) \leq 9K N^2 $$ for large values of $N$.

In particular there is some $N\leq 12\cdot(9000)^2$ such that $r_3'(N)\geq 1000$.

As an alternative, the fact that $r_2(n)=[x^n]\vartheta_3(x)^2=4(\chi_4*1)(n)$ is unbounded clearly implies that $r_3(n)=[x^n]\vartheta_3(x)^3$ is unbounded as well.

Actually the least integer $n$ such that $r_3'(n)\geq 1000$ is less than $4\cdot 10^6$.
Indeed a straightforward generalization of the Gauss circle problem leads to the inequality $$ \frac{\pi}{6}\left(\sqrt{N}-\tfrac{1}{2}\sqrt{3}\right)^3\leq \sum_{k=1}^{N}r_3'(k) \leq \frac{\pi}{6}\left(\sqrt{N}+\tfrac{1}{2}\sqrt{3}\right)^3 $$ for any $N\geq 4$, and to the more compact estimation $$ \sum_{k=1}^{N}r_3'(k) = \frac{\pi}{6}N\sqrt{N}+N\cdot K(N),\qquad \left|K(N)\right|\leq\frac{3}{2}. $$ In particular $r_3'(k)$ has to be $\geq 1000$ for some $k\leq \frac{11}{3}\cdot 10^6$.

In explicit terms, it is not that difficult to check that $r_3'(5^9)>1000$.