Hardy's circle discrepancy formula expresses the error in the lattice point count for Gauss's circle problem
as a series of Bessel functions of the
first kind. For a disk of radius
centered at the origin, let
count each interior lattice
point with weight 1 and each boundary lattice point
with weight
. The weighted discrepancy is given by (Hardy 1915,
Berndt et al. 2019)
where
is the sum of squares function for two squares,
and
is the Bessel function of the first
kind of order 1.
If
counts boundary lattice points with full weight,
its discrepancy
equals the series when there are no boundary lattice
points. When
is an integer, the full-weight
discrepancy equals the sum of the series plus
.