If we re-arrange the formula for the prime number theorem

lim_{n->∞}π(n)*log_{e}(n) / n

We can obtain the more useful form,

π(n) ~ n / log_{e}(n)

This tells us that the prime number density (the number of primes that exist) between 1 and n is asymptotic (i.e. approximately equal) to n / log_{e}(n).

How good is this result? In reality, there are 25 primes less than 100, but π(100) = 21.715. This is a difference of about 15%. But, the larger the value of n, the better the approximation gets. For instance π(1,000,000)=72,382, where in reality there are 78,498 primes less than one million. Now the difference is only 8%.

Why does this work? Honestly, I don't know. The mathematics are beyond me, but I think it has something to do with the Sieve of Eratosthenes method of finding prime numbers. I can't prove it, though.

Reference: Goodaire, Parmenter __Discrete Mathematics with Graph Theory__ 1998 Prentice Hall, Upper Saddle River, NJ.