# An asymptotic expression for the solution to the squares problem suggested by statistical mechanics

The $s$ squares problem is to count the number $r_s (n)$ of integer solutions $(x_1,x_2,...,x_s)$ of the Diophantine equation $x_{1}^{2}+x_{2}^{2}+...+x_{s}^{2}=n$ in which changing the sign or order of the $x_i$ ’s gives distinct solutions. If looking into the statistical mechanics for classical ideal gas in 3D, we meet with the same thing with $s=3N$, $N$ is the number of particles. But now the $3N$ squares problem is to count the number of the microstates in the so-called microscope ensemble. The following asymptotic expression of $r_{3N}(n)$ is experimentally validated, so it is physically proved:

$r_{3N}(n)\approx \frac{{\pi}^{3N/2}}{\Gamma (3N/2)} {{n}^{3N/2-1}}$, in thermodynamic limit $n/N=const.$ and $n \to \infty$ .

My question is: How to give an estimate of the error, and does anyone know such a formula in mathematical literature?

Ref.

S.C.Miline, New infinite families of exact sums of squares formulas, Jacobi elliptic functions and Ramanujan’s tau function, Proc. Natl. Acad. Sci. USA, 1996, 93:15004-15008, and references cited therein.

• What do you mean there is no such formula in mathematical literature? It seems to me that you are just giving a crude estimate based on the number of lattice points inside a sphere. – Gjergji Zaimi Sep 11 '10 at 11:04
• Is what you are claiming this: that for each positive integer $k$ $$r_{3N}(kN)\sim\frac{\pi^{3N/2}}{\Gamma(3N/2)}(kN)^{3N/2-1}$$ as $N\to\infty$? You claim this is proved; have you a reference to the proof? (Is Milne's paper such a reference?) Are you sure there is "no such formula in mathematical literature"? (There's an awful lot of mathematical literature). – Robin Chapman Sep 11 '10 at 11:05
• QHLIU: in the original question, you said the limit was "proved". Now you say it's a "problem". What exacty do you mean? – Robin Chapman Sep 11 '10 at 11:30
• QHLIU: so, when you said the statement was proved, that wasn't actually what you meant :-( Also now both $n$ and $N$ are "linearly indpendent" and $n/N$ is constant. :-( – Robin Chapman Sep 11 '10 at 11:40
• QHLIU: have you a mathematical question here? Are you still asserting that the assertion you claimed was "proved" is proved? If so please can you give a reference? – Robin Chapman Sep 11 '10 at 11:44

Why is it wrong? Let's denote $3N$ by $N$ and the ratio $n/N$ (my $N$) by $k$ to simplify the matters. Then we are to find the $n$-th coefficient of the function $F(z)^N$ where $F(z)=1+2z+2z^4+2z^9+\dots$. It is the average of $F(z)^Nz^{-n}$ over any circle of radius less than $1$. The last expression can also be written as $G(z)^N$ where $G=F(z)z^{-k}$. Now choose the radius $r_k$ that minimizes $F(r)r^{-k}$ on $(0,1)$. Then we can use the classical Laplace formula on that circle and get $(F(r_k)r_k^{-k})^N$ as the main exponential factor. I do not know what $F(r_k)r_k^{-k}$ is, but I know it is not $\sqrt{\pi ek}$ because I can invert the Legendre transform of the latter in logarithmic coordinates. Admitted, it becomes close to it when $k$ is allowed to grow, but in the declared range (small $k$) the OP's approximation is off by an exponential factor, which makes that $-1$ in the power of $n$ totally pathetic.