The Landau-Ramanujan constant is the constant in the asymptotic formula for
the count of sums of two squares. Let
denote the number of positive
integers not exceeding
which can be expressed as a sum of two squares
(i.e., those
such that the sum of squares function
).
For example, the first few such integers are
|
(1)
| |||
|
(2)
| |||
|
(3)
| |||
|
(4)
| |||
|
(5)
|
(OEIS A001481), so ,
,
,
,
, and so on. Then
|
(6)
|
as proved by Landau (1908), where is a constant. Ramanujan independently
stated the theorem in the slightly different form that the number of numbers between
and
which are either squares or sums of two squares
is
|
(7)
|
where
and
is very small compared with the previous integral (Berndt
and Rankin 1995, p. 24; Hardy 1999, p. 8; Moree and Cazaran 1999).
For a positive integer ,
iff every prime
with
occurs with an even exponent in the prime
factorization of
.
The constant has numerical value
|
(8)
|
(OEIS A064533). However, the convergence to the constant , sometimes also denoted
, is very slow. The following table summarizes the values
of
for the first few powers of 10, where the sequence of
is (OEIS A164775).
| 7 | 1.062199 | |
| 43 | 0.922765 | |
| 330 | 0.867326 | |
| 2749 | 0.834281 | |
| 24028 | 0.815287 | |
| 216341 | 0.804123 | |
| 1985459 | 0.797109 | |
| 18457847 | 0.792198 | |
| 173229058 | 0.788587 | |
| 1637624156 | 0.785818 |
An exact formula for the constant is given by
|
(9)
|
(Landau 1908; Le Lionnais 1983, p. 31; Berndt 1994; Hardy 1999, Moree and Cazaran 1999), and an equivalent formula is given by
|
(10)
|
Flajolet and Vardi (1996) give a formula with fast convergence
|
(11)
|
where
is the Riemann zeta function and
is the Dirichlet
beta function.
Another closed form is
|
(12)
|
where
is the Kronecker delta and
is the sum of squares
function.
An equivalent formula in terms of the polygamma function is
|
(13)
|
where
|
(14)
|
where
is a Bernoulli number and
is the polygamma
function of order
.
Landau also proved the even stronger fact
|
(15)
|
where
|
(16)
| ||||
|
(17)
|
(OEIS A227158), e is the base of the natural logarithm, is the Euler-Mascheroni
constant, and
is the lemniscate constant.
Landau's method of proof can be extended to show that
|
(18)
|
has an asymptotic series
|
(19)
|
where
can be arbitrarily large and the
are constants with
(Moree and Cazaran 1999).