# Gauss circle problem A circle of radius 5 centered at the origin has area 25π, approximately 78.54, but it contains 81 integer points, so the error in estimating its area by counting grid points is approximately 2.46. For a circle with slightly smaller radius, the area is nearly the same, but the circle contains only 69 points, producing a larger error of approximately 9.54. The Gauss circle problem concerns bounding this error more generally, as a function of the radius of the circle.

In mathematics, the Gauss circle problem is the problem of determining how many integer lattice points there are in a circle centered at the origin and with radius $r$ . This number is approximated by the area of the circle, so the real problem is to accurately bound the error term describing how the number of points differs from the area. The first progress on a solution was made by Carl Friedrich Gauss, hence its name.

## The problem

Consider a circle in $\mathbb {R} ^{2}$ with center at the origin and radius $r\geq 0$ . Gauss' circle problem asks how many points there are inside this circle of the form $(m,n)$ where $m$ and $n$ are both integers. Since the equation of this circle is given in Cartesian coordinates by $x^{2}+y^{2}=r^{2}$ , the question is equivalently asking how many pairs of integers m and n there are such that

$m^{2}+n^{2}\leq r^{2}.$ 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 12 followed by the list of values $\pi r^{2}$ rounded to the nearest integer:

1, 5, 13, 29, 49, 81, 113, 149, 197, 253, 317, 377, 441 (sequence A000328 in the OEIS)
0, 3, 13, 28, 50, 79, 113, 154, 201, 254, 314, 380, 452 (sequence A075726 in the OEIS)

## Bounds on a solution and conjecture

$N(r)$ is roughly $\pi r^{2}$ , the area inside a circle of radius $r$ . This is because on average, each unit square contains one lattice point. Thus, the actual number of lattice points in the circle is approximately equal to its area, $\pi r^{2}$ . So it should be expected that

$N(r)=\pi r^{2}+E(r)\,$ for some error term $E(r)$ of relatively small absolute value. Finding a correct upper bound for $\mid E(r)\mid$ is thus the form the problem has taken. Note that $r$ does not have to be an integer. After $N(4)=49$ one has$N({\sqrt {17}})=57,N({\sqrt {18}})=61,N({\sqrt {20}})=69,N(5)=81.$ At these places $E(r)$ increases by $8,4,8,12$ after which it decreases (at a rate of $2\pi r$ ) until the next time it increases.

Gauss managed to prove that

$|E(r)|\leq 2{\sqrt {2}}\pi r.$ Hardy and, independently, Landau found a lower bound by showing that

$|E(r)|\neq o\left(r^{1/2}(\log r)^{1/4}\right),$ using the little o-notation. It is conjectured that the correct bound is

$|E(r)|=O\left(r^{1/2+\varepsilon }\right).$ Writing $E(r)\leq Cr^{t}$ , the current bounds on $t$ are

${\frac {1}{2}} with the lower bound from Hardy and Landau in 1915, and the upper bound proved by Martin Huxley in 2000.

## Exact forms

The value of $N(r)$ can be given by several series. In terms of a sum involving the floor function it can be expressed as:

$N(r)=1+4\sum _{i=0}^{\infty }\left(\left\lfloor {\frac {r^{2}}{4i+1}}\right\rfloor -\left\lfloor {\frac {r^{2}}{4i+3}}\right\rfloor \right).$ This is a consequence of Jacobi's two-square theorem, which follows almost immediately from the Jacobi triple product.

A much simpler sum appears if the sum of squares function $r_{2}(n)$ is defined as the number of ways of writing the number $n$ as the sum of two squares. Then

$N(r)=\sum _{n=0}^{r^{2}}r_{2}(n).$ Most recent progress rests on the following Identity, which has been first discovered by Hardy: 

$N(x)-{\frac {r_{2}(x^{2})}{2}}=\pi x^{2}+x\sum _{n=1}^{\infty }{\frac {r_{2}(n)}{\sqrt {n}}}J_{1}(2\pi x{\sqrt {n}}),$ where $J_{1}$ denotes the Bessel function of the first kind with order 1.

## Generalizations

Although the original problem asks for integer lattice points in a circle, there is no reason not to consider other shapes, for example conics; indeed Dirichlet's divisor problem is the equivalent problem where the circle is replaced by the rectangular hyperbola. Similarly one could extend the question from two dimensions to higher dimensions, and ask for integer points within a sphere or other objects. There is an extensive literature on these problems. If one ignores the geometry and merely considers the problem an algebraic one of Diophantine inequalities then there one could increase the exponents appearing in the problem from squares to cubes, or higher.

The dot planimeter is physical device for estimating the area of shapes based on the same principle. It consists of a square grid of dots, printed on a transparent sheet; the area of a shape can be estimated as the product of the number of dots in the shape with the area of a grid square.

### The primitive circle problem

Another generalization is to calculate the number of coprime integer solutions $m,n$ to the inequality

$m^{2}+n^{2}\leq r^{2}.\,$ This problem is known as the primitive circle problem, as it involves searching for primitive solutions to the original circle problem. It can be intuitively understood as the question of how many trees within a distance of r are visible in the Euclid's orchard, standing in the origin. If the number of such solutions is denoted $V(r)$ then the values of $V(r)$ for $r$ taking small integer values are

0, 4, 8, 16, 32, 48, 72, 88, 120, 152, 192 … (sequence A175341 in the OEIS).

Using the same ideas as the usual Gauss circle problem and the fact that the probability that two integers are coprime is $6/\pi ^{2}$ , it is relatively straightforward to show that

$V(r)={\frac {6}{\pi }}r^{2}+O(r^{1+\varepsilon }).$ As with the usual circle problem, the problematic part of the primitive circle problem is reducing the exponent in the error term. At present the best known exponent is $221/304+\varepsilon$ if one assumes the Riemann hypothesis. Without assuming the Riemann hypothesis, the best known upper bound is

$V(r)={\frac {6}{\pi }}r^{2}+O(r\exp(-c(\log r)^{3/5}(\log \log r^{2})^{-1/5}))$ for a positive constant $c$ . In particular, no bound on the error term of the form $1-\varepsilon$ for any $\varepsilon >0$ is currently known that does not assume the Riemann Hypothesis.