# Legendre's constant

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).

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 $\scriptstyle\pi(x)$. Its value is now known to be exactly 1.

Examination of available numerical evidence for known primes led Legendre to suspect that $\scriptstyle\pi(x)$ satisfies:

$\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.

Later Carl Friedrich Gauss also examined the numerical evidence and concluded that the limit might be lower.

Charles Jean de la Vallée-Poussin, who proved the prime number theorem[1] (independently from Jacques Hadamard), finally showed that B is 1.

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.

## References

1. ^ Vallée Poussin, C. Mém. Couronnés Acad. Roy. Belgique 59, 1-74, 1899