Number of integer points in sphere of given radius

128 Views Asked by At

The $n$ dimensional analogue of the Gauss circle problem is to find the size of the intersection between the lattice $\mathbb{Z}^n$ and the $n$ dimensional sphere of radius $R$. That is, the size of the set

$$ S(n, R) = \{x = (x_1, \dots, x_n) \in \mathbb{Z}^n\, \colon\, \lVert x \rVert^2 \leq R^2 \}. $$

A comprehensive survey is given in [KKN] and the special case where $R = \Theta(n^{1/2})$ is examined in [MO].

For $n \geq 5$ the asymptotic behaviour is well understood, see e.g. page 8 of [KKN]. Translated into the language of the above, we have

$$ \lvert S(n, R)\rvert = \frac{\pi^{n/2}}{\Gamma(1 + n/2)} \cdot R^n + \Theta(R^{n - 2}). $$

Both [MO] and this mathoverflow question suggest that provided $R = \Omega(n^{1/2 + \varepsilon})$ for some $\varepsilon > 0$ then the error term does not dominate in the above equation. Therefore the size of the set is asymptotically the volume of the sphere.

If we specialise to even $n$ for ease, say $n = 2m$, then we can simplify the above to

$$ \lvert S(n, R)\rvert = \frac{\pi^{m}}{m!} \cdot R^{2m} + \Theta(R^{2m - 2}). $$

We set $R = n/2 = m$, so $R = \Omega(n^{1/2 + \varepsilon})$ and use Stirling's approximation in the form $m! \sim \sqrt{2\pi m} {(m/e)}^m$ to find

$$ \lvert S(n, R)\rvert = \frac{\pi^m e^m m^m}{\sqrt{2\pi m}} + \Theta(m^{2m - 2}). $$

Here the error term dominates so it seems we cannot just take the volume of the sphere as an asymptotic estimate, even though it was suggested for this regime we can.

I suspect I am just making an elementary mistake, but I have been puzzled by this for a while now; any help?