Wednesday, 23 December 2020

The Prime Number Theorem

We’ve just seen experimental evidence that n/ln(n) approximates π(n) fairly well. Although the error itself grows as n, the proportional error gets ever smaller.

Let’s write that out.

limnπ(n)n/ln(n)π(n)=0

Rearranging this gives us the following.

limnπ(n)n/ln(n)=1

This says the ratio of π(n) and the approximation n/ln(n) tends to 1 as n. And this is precisely what the prime number theorem says.

π(n)n/ln(n)

The symbol says that both sides are asymptotically equivalent. For example, f(n)g(n) means f(n)/g(n)=1 as n.


Video: [youtube]

Slides: [pdf]


Asymptotic Equivalence

Some examples of asymptotic equivalence will help clarify its meaning.

If f(x)=x2+x and g(x)=x2, then fg. Both f and g have the same dominant term x2.

limxx2+xx2=limx1+1x=1

Swapping f and g doesn't break asymptotic equivalence, gf.

limxx2x2+x=limx11+1x=1

However, if f(x)=x3 and g(x)=x2, then f and g are not asymptotically equivalent because the ratio f/g tends to x, not 1. 

If we know that fg and gh, then we can also say fh. This property, called transitivity, is familiar from normal equality.


What About li(n)?

Gauss' second approximation li(n) appeared to be a better approximation for π(n). You'll find the prime number theorem is sometimes expressed using the logarithmic integral.

π(n)li(n)

Surely the prime number theorem must be about one of the approximations, not both? The only solution is for both approximations to be asymptotically equivalent. Let's see that this is indeed the case.

Let's set f(n)=nln(n) and g(n)=0n1ln(x)dx

To show fg we need to find the limit of f(n)/g(n) as n and confirm it is 1. Sadly, both f(n) and g(n) become infinitely large as n, so the ratio is undefined. 

When this happens, we usually try l'Hopital's rule as an alternative way to find the limit.

limnf(n)g(n)=limnf(n)g(n)

It's fairly easy to work out f(n)=ln(n)1ln2(n), and g(n)=1ln(n) pops out of the definition of li(n)

limnf(n)g(n)=limn(ln(n)1)ln(n)ln2(n)=limn11ln(n)=1

So the prime number theorem can refer to either of the two approximations, n/ln(n) and li(n), because they are asymptotically equivalent.


What Does The Prime Number Theorem Really Say?

The prime number theorem says that π(n) grows in a way that is asymptotically equivalent to functions like n/ln(n) and li(n)

It doesn't say that these are the only or best functions for approximating π(n), which leaves open the intriguing possibility of other functions that are even better than li(n).


Bertrand's Postulate

The prime number theorem, even if it looks imprecise, is rather useful. Let's look at a particularly simple example.

In 1845 Bertrand proposed that there is at least one prime between a counting number and its double, n<p<2n.

Let's compare the number of primes up to 2x, with the number of primes up to x.

π(2x)π(x)2xln(2x)ln(x)x2

This shows that for sufficiently large x, between x and 2x, there are x/ln(x) primes. This is a stronger statement than Bertrand's postulate which merely suggests there is at least one prime.

There are proofs that don't require x to be sufficiently large, but they're nowhere near as simple as this deduction from the prime number theorem.

No comments:

Post a Comment