# Legendre's constant

Legendre's constant is a mathematical constant occurring in a formula conjectured by Adrien-Marie Legendre to capture the asymptotic behavior of the prime-counting function $\pi (x)$ . Its value is now known to be exactly 1. The first 100,000 elements of the sequence an = ln(n) − n/π(n) (red line) appear to converge to a value around 1.08366 (blue line). Later elements up to 10,000,000 of the same sequence an = ln(n) − n/π(n) (red line) appear to be consistently less than 1.08366 (blue line).

Examination of available numerical evidence for known primes led Legendre to suspect that $\pi (x)$ satisfies an approximate formula.

Legendre conjectured in 1808 that

$\pi (x)={\frac {x}{\ln(x)-B(x)}}$ where $\lim _{x\to \infty }B(x)=1.08366$ ....

Or similarly,

$\lim _{n\to \infty }\left(\ln(n)-{n \over \pi (n)}\right)=B$ where B is Legendre's constant. He guessed B to be about 1.08366, but regardless of its exact value, the existence of B implies the prime number theorem.

Pafnuty Chebyshev proved in 1849 that if the limit B exists, it must be equal to 1. An easier proof was given by Pintz in 1980.

It is an immediate consequence of the prime number theorem, under the precise form with an explicit estimate of the error term

$\pi (x)={\rm {Li}}(x)+O\left(xe^{-a{\sqrt {\ln x}}}\right)\quad {\text{as }}x\to \infty$ (for some positive constant a, where O(…) is the big O notation), as proved in 1899 by Charles de La Vallée Poussin, that B indeed is equal to 1. (The prime number theorem had been proved in 1896, independently by Jacques Hadamard and La Vallée Poussin, but without any estimate of the involved error term).

Being evaluated to such a simple number has made the term Legendre's constant mostly only of historical value, with it often (technically incorrectly) being used to refer to Legendre's first guess 1.08366... instead.

Pierre Dusart proved in 2010

${\frac {x}{\ln x-1}}<\pi (x)$ for $x\geq 5393$ , and
$\pi (x)<{\frac {x}{\ln x-1.1}}$ for $x\geq 60184$ . This is of the same form as
$\pi (x)={\frac {x}{\ln(x)-B(x)}}$ with $1 .