# Gauss circle problem

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 R2 with center at the origin and radius r ≥ 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 x2 + y2 = r 2, the question is equivalently asking how many pairs of integers m and n there are such that

${\displaystyle 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 ${\displaystyle \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 πr2, 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, πr2. So it should be expected that

${\displaystyle N(r)=\pi r^{2}+E(r)\,}$

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

Gauss managed to prove[1] that

${\displaystyle |E(r)|\leq 2{\sqrt {2}}\pi r.}$

Hardy[2] and, independently, Landau found a lower bound by showing that

${\displaystyle |E(r)|\neq o\left(r^{1/2}(\log r)^{1/4}\right),}$

using the little o-notation. It is conjectured[3] that the correct bound is

${\displaystyle |E(r)|=O\left(r^{1/2+\varepsilon }\right).}$

Writing |E(r)| ≤ Crt, the current bounds on t are

${\displaystyle {\frac {1}{2}}

with the lower bound from Hardy and Landau in 1915, and the upper bound proved by Huxley in 2000.[4]

## 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:[5]

${\displaystyle 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.[6]

A much simpler sum appears if the sum of squares function r2(n) is defined as the number of ways of writing the number n as the sum of two squares. Then[1]

${\displaystyle N(r)=\sum _{n=0}^{r^{2}}r_{2}(n).}$

## Generalisations

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.[3] 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 primitive circle problem

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

${\displaystyle 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.[7] 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/π2, it is relatively straightforward to show that

${\displaystyle 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 + ε if one assumes the Riemann hypothesis.[7] Without assuming the Riemann hypothesis, the best known upper bound is

${\displaystyle 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.[7] In particular, no bound on the error term of the form 1 − ε for any ε > 0 is currently known that does not assume the Riemann Hypothesis.

## Notes

1. ^ a b G.H. Hardy, Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, (1999), p.67.
2. ^ G.H. Hardy, On the Expression of a Number as the Sum of Two Squares, Quart. J. Math. 46, (1915), pp.263–283.
3. ^ a b R.K. Guy, Unsolved problems in number theory, Third edition, Springer, (2004), pp.365–366.
4. ^ M.N. Huxley, Integer points, exponential sums and the Riemann zeta function, Number theory for the millennium, II (Urbana, IL, 2000) pp.275–290, A K Peters, Natick, MA, 2002, MR1956254.
5. ^ D. Hilbert and S. Cohn-Vossen, Geometry and the Imagination, New York: Chelsea, (1999), pp.37–38.
6. ^ Hirschhorn, Michael D. (2000). "Partial Fractions and Four Classical Theorems of Number Theory". The American Mathematical Monthly. 107 (3): 260–264. doi:10.2307/2589321. JSTOR 2589321.
7. ^ a b c J. Wu, On the primitive circle problem, Monatsh. Math. 135 (2002), pp.69–81.