An even better approximation, and an estimate of the error term, is given by the formula
Here is a table that shows how the three functions (π(x), x/ln(x) and Li(x)) compare:
|x||π(x)||π(x) - x/ln(x)||Li(x) - π(x)||x/π(x)|
As a consequence of the prime number theorem, one get an asymptotic expression for the nth prime number p(n):
The theorem was conjectured by Adrien-Marie Legendre in 1798 and proved independently by Hadamard and de la Vallée Poussin in 1896. The proof used methods from complex analysis, specifically the Riemann zeta function. Nowadays, so-called "elementary" proofs are available that only use number theoretic means. The first of these was provided partly independently by Paul Erdös and Atle Selberg in 1949 although it was previously believed that such proofs with only real variables could not be found.
Because of the connection between the Riemann zeta function and π(x), the Riemann hypothesis has considerable importance in number theory: if established, it would yield a far better estimate of the error involved in the prime number theorem than is available today.