# Gauss circle problem and Jacobi-type estimates for higher dimensions

Hello everyone, I was doing some late night random reading and I got to wonder about some stuff about the Gauss circle problem.

To begin with, consider a circle in $\mathbb{R}^{2}$ with centre at the origin and radius $r \geq 0$. Gauss asked for an estimate on how many lattice points are there inside this circle.

If the answer for a given $r$ is denoted by $N(r)$ then the following list shows the first few values of $N(r)$ for $r$ an integer between $0$ and $10$: $1, 5, 13, 29, 49, 81, 113, 149, 197, 253, 317$ (sequence A000328 in OEIS).

Some estimates are known on $N(r)$ are also known, for example, I believe $N(r) = \pi r^{2} + E(r)$, where $E(r) \leq O(r^{\frac{2}{3}})$ was proven.

Anyway, what I'm interested in is the trivial formula $N(r) = \sum_{n=0}^{r^{2}}{r_{2}(n)}$, where $r_{2}(n)$ represents the number of ways the positive integer $n$ can be written as a sum of two squares. This is closely related to Minkowski's (first) theorem, as one could recall for instance the celebrated proof that any prime $p = 4k+1$ can be written as a sum of two squares.

On the other hand, we know that $r_{2}(n)$ is given by (less trivial) Jacobi formula: $r_{2}(n) = 4(d_{1}(n)-d_{3}(n))$, where $d_{i}(n)$ is the number of prime divisors of $n$ having form $4k+i$, with $i = 1,3$. So, my question is: couldn't we recover this formula from the trivial formula for $N(r)$ above by using some Mobius inversion formula and some stuff about $N(r)$?

My question is motivated by the fact that $\frac{1}{4} r_{2}(n)$ is multiplicative, so an application of Mobius would give the $4$ outside the paranthesis of the Jacobi estimate. Same thing for the the $4$-dimensional problem; we have the estimate $N(r) = \sum_{n=0}^{r^{2}} {r_{4}(n)}$, where $r_{4}(n)$ represents the number of ways to write $n$ as a sum of four squares. There's a Jacobi formula that gives $r_{4}(n) = 8d(n)$, where $d$ is the number of divisors of $n$ that are not divisible by $4$. Again, here $\frac{1}{8} r_{4}(n)$ is multiplicative, so we get the $8$ when applying Mobius inversion.

I would really like to hear more about these things if one knows some references. A positive answer to my really optimistic inquiry would be very nice since we would then be able to get formulas for $r_{k}(n)$ in general (the number ways of writing $n$ as a sum of $k$ squares) - which is a pretty hard thing to do. Thanks and apologies if this is nonsense!

-
Regarding the reference for E(r), I mean even if it was very late at night couldn't you still have found the Wikipedia page on Gauass circle problem, mentioning results on E(r)... en.wikipedia.org/wiki/Gauss_circle_problem – user9072 Feb 28 '13 at 15:18
I don't think we really care about the estimates on E(r) here... that's why I didn't bother to give more details about the references about that (I knew about their existence). – Cosmin Pohoata Feb 28 '13 at 15:45
(My comment referred to an earlier version, asking though only in passing about a reference.) – user9072 Feb 28 '13 at 15:48