In mathematics, the prime-counting function is the function counting the number of prime numbers less than or equal to some real number x. It is denoted by π(x) (unrelated to the number π).
Of great interest in number theory is the growth rate of the prime-counting function. It was conjectured in the end of the 18th century by Gauss and by Legendre to be approximately
in the sense that
This statement is the prime number theorem. An equivalent statement is
where li is the logarithmic integral function. The prime number theorem was first proved in 1896 by Jacques Hadamard and by Charles de la Vallée Poussin independently, using properties of the Riemann zeta function introduced by Riemann in 1859.
More precise estimates of are now known; for example
where the O is big O notation. For most values of we are interested in (i.e., when is not unreasonably large) is greater than , but infinitely often the opposite is true. For a discussion of this, see Skewes' number.