# Prime Number Theorem

The Prime Number Theorem is one of the most famous theorems in mathematics. It states that the number of primes not exceeding n is asymptotic to $\frac{n}{\log(n)}$, where log(n) is the logarithm of (n) to the base e.

$\pi(n)\sim\frac{n}{\ln n}$.

The number of primes not exceeding n is commonly written as π(n), the prime counting function. An asymptotic relationship between a(n) and b(n) is commonly designated as a(n)~b(n). (This does not mean that a(n)-b(n) is small as n increases. It means the ratio of a(n) to b(n) approaches one as n increases.)

The Prime Number Theorem thus states that π(n)~n / log(n) . That is, as n tends to infinity, the relative error between π(n) and n / log(n) tends to zero. This can be expressed using limit notation as

$\lim_{n\to\infty}\frac{\pi(n)}{n/\ln(n)}=1$

In other words, the limit (as n approaches infinity) of the ratio of pi(n) to n/log(n) is one. Put a third way, n / log(n) is a good approximation for π(n).

## Equivalent Statements

Carl Friedrich Gauss conjectured the equivalent statement that π(x) was asymptotic to Li(x) defined as:

$\mbox{Li}(x) = \int_2^x \frac{dt}{\ln t}$.

In fact, for large x this turns out to be a better approximation than π(x). The size of the error Li(x) − π(x) is closely related to the behavior of the Riemann Zeta function

## History of the Theorem

The theorem was first conjectured by Legendre and Gauss (independently) circa 1796. In 1848 and 1850, Chebyshev made significant progress towards proving the theorem using the Riemann zeta function and other non-elementary techniques. His non-elementary proof was completed in 1896 by Hadamard and Charles de la Vallee-Poussin.

The grand culmination of these efforts occurred in 1949 and 1950 when Paul Erdos and Atle Selberg presented an elementary proof of the theorem. This proof earned Selberg the highest prize in math, the Fields Medal.