Prime Number Theorem


Prime number theorem, which claims the number of primes below is asymptotically equal to , is one of the most important concept developed by mathematicians, nevertheless a flex of its muscle of the analytic number theory.

Besides a non-trivial distribution rule of prime numbers, the prime number theorem is actually a bridge of enormous analytic method applied to number theory, which we will see in the following texts.

In this text, we will first introduce some prime number related distribution functions, then we will prove the prime number theorem using a purely real analysis method (for which they call it elementary), developed by Selberg and Erdos. We will also introduce the proof using complex analysis and properties of analytic continuation of Riemann zeta function in the following texts. Finally, we will demonstrate some real world applications of the prime number theorem.

Prime distribution functions

First, we will introduce some functions closely related to prime distribution, demonstrating their properties and connection with each other.

Prime counting function

Let the prime indicator function and prime counting function be:

Definition (Prime Indicator Function)
Definition (Prime Counting Function)

Which counts the number of primes up to . With them, we can formally express the prime number theorem:

Assertion (Prime Number Theorem)

Which provides an asymptotic expansion of the prime counting function, and is what we will prove in this text later.

Von Mangoldt function

Let the von Mangoldt function be defined as below:

Definition (von Mangoldt Function)

Such function only yield for each prime or prime power . It's not multiplicative since otherwise it must be instead of for general cases. But we can still show:

Lemma

Proof. Noted that only prime or prime power will yield non-zero value at von Mangoldt function, which means we must only iterate prime power factors of the input integer, and we have:

In this way, we've shown the connection between von Mangoldt function and natural logarithmic function.

Corollary
Corollary

It's easy to give an asymptotic expansion of :

Lemma
Proof.

And we are going to reveal the connection between the prime numbers and the von Mangoldt function:

Theorem

Proof. Again, it's time to utilize the property of to yield non-zero values only at prime or prime power , thus we have:

We would like to show equals asymptotically.

Noted that for every prime prime power , we have , so we can expand the summation ranged from to into to . Similarily, for every prime , there must , and we don't have to constrain to . Thus we have:

While one may suspect we've amplified too much that it must be rather than , but noted that is also a series, and by the rationale above it must also converge to a constant, or . In this way, we can have faith in 's being asymptotically equal to .

Finally we have:

And we are done with the proof.

Although it's in the form of , the function fails to have continous derivative on , so we may not use the Abel's identity directly. However, this theorem still plays an important role in the proof of prime number theorem.

Chebyshev's Psi and Theta functions

Then, we would like to define the Chebyshev's - and -functions as below:

Definition (Chebyshev's Psi and Theta Functions)

These two functions are connected by:

Theorem

Proof. Again, due to 's yielding non-zero values at prime or prime power , it's very easy to get to a point that:

The point differs from conclusion we would like to prove only at the upper bound of summation, which is versus . It won't be hard to find when is sufficient large, there will be no summand in . And when there's no summand, must be smaller than the smallest prime , so we have .

Conversely, if we would like to correspond to with non-empty summand, there must be:

And since must be integers, it must be capped at , now we are done.

Corollary

Based on this connection, we could show the following limit:

Theorem

Proof. First, it can be shown that is bounded above:

By L'Hospital's rules, we can find:

And we know there's trivially , by the squeeze theorem, since is squeezed between and , which tends to as , will also tend to as .

On the other hand, and can be shown to be related to each other by Abel's identity:

Lemma
Proof.

In the proof above, noted that , and the is introduced to avoid using as denominator.

This can be used to show:

Lemma (Sufficient Condition of the Prime Number Theorem)

Proof. One can easily do the transformation that:

And it suffices to show:

However, by we have and , thus we have:

And we are done with the proof.

In this way, if we are able to prove , in other word, , the prime number theorem would be proven thereby.

Recall that we have already shown , and this conclusion could be utilized by the following analytical theorem:

Theorem (Shapiro's Tauberian Theorem)
For a non-negative sequence such that , we have:

  1. .
  2. .
  3. .

Proof. First, we need to show #1, let . Noted that , while in the middle of summation, we have:

Where and , so the sequence is non-negative, and thus:

Where the in the summands annihilate to since , which is again due to the hyperbola property of .

Now clearly there's . and we can let , now we have . Consider the following telescopes:

Which can be summed into:

In this way, we've proved #1.

The proof of #2 is just as a simple transformation as:

Where #1 is required to replace into .

Finally, in order to prove #3, we need to interpret the conclusion of #2 as:

Just like what we have done in proving #1, let then we have:

Now we can consider the following inequality:

Note that , which means there definitely exists a chose of such that or , in which we have .

On the other hand, we have:

Which means . So we can let and then complete the proof of #3.

Corollary (Chebyshev)

Proof. First, by the Shapiro's tauberian theorem we know , and therefore and exists, we just need to determine their range.

Let , which means , or . Noted that increase monotonically, when we have:

Which means or divide on both sides and we have . The magnitude of can be arbitrarily small by requiring to be sufficiently large so that we have or . And since such must hold for arbitrarily small , it can only be .

Similarily, let , which means , or . And when we have:

And then we have: . The magnitude of can be arbitrarily small by requiring to be sufficiently large so that we have or . And since such must hold for arbitrarily small , it must be .

Combine all of them together and we are done with the proof.

However, this is still not strong enough to prove since it's very likely that , and we still need to move on.

Selberg and Erdos's elementary proof

There're many way to show in analytic number theory. And in this text, we will introduce the "elementary" proof by Selberg and Erdos. Compared to the non-elementary proof, the proof is purely technical and has less profound meaning, but for proving the correctness of prime number theorem, it suffices.

Selberg's asymptotic formula

The elementary proof begins with an asymptotic expansion related to :

Theorem (Selberg's Asymptotic Formula)

Proof. First, let and compute :

This will lead us to the following formula with multipart summations:

Let's begin with the summation part . First, we need to show there's by L'Hospital's rule:

Which will lead us to:

Here's the craziest part. Noted that each summation parts remained are in the form of generalized convolution, and is the Dirichlet inverse of (by its being completely multiplicative). Let , what we are going to do is looking for ways to represent in the form of . Once it were possible, since they are in the form of , then we will soon have . Of course, error terms might be inevitable and must be handled properly.

By the asymptotic expansion , which can be fixed into , it turns out we can let and give it a shot:

The replacement for is relatively hard to observe (although can be guessed from what we are to prove), instead we will just give out the result for verification:

Thus we can let and give another a shot:

Finally, put all of them back and we will get:

Which is exactly what we are to prove.

Corollary

Proof. The second part can be obtained directly by expanding , while the first part is due to the Abel's identity:

Where and are used.

Substitution of the remainder term

On the other hand, consider the following expansion:

This inspire us to analyze the remainder term , actually proving prime number theorem suffices to show:

Assertion

At the beginning, we definitely have:

And we would like to show:

Theorem

Let , then we have:

Proof. We deliberatedly construct the following expressions:

The error terms can be estimated by:

Thus we have:

Noted that all terms of are positive, by triangle inequality we have:

Which is exactly what we are to prove.

We need to show the right hand side of the inequality can be replaced by integral, the proof and the lemmas required are shown as the following:

Lemma

For sequence and any function , let , we have the following transformation:

Proof. In the proof of the Abel's identity, noted that the first transformation is completely formal, we just need to fix the parameter of there, which will bring us to:

Which is exactly what we are to prove.

Theorem

Proof. We would like to let and , then apply the formula above, but let's do some analysis first.

Then, for the difference of , we have:

So by putting them together we have:

We need to handle the stair cases of in and the trailing as the following:

Where the amplification of into is due to , and the substitution of into is due to L'Hospital's rule on .

Thus finally we have:

Which is exactly what we are to prove.

Corollary

The elementary proof then construct a new function in order to apply some analytic method easily. It won't be hard to see there's:

As by the monotonicity of we have and vice versa.

To do so, the elementary proof do some transformation on the inequality we have just derived for :

Theorem

Proof. This is done by a change-of-variable. If we let , which indicates and , then we have:

Where we let .

A comment on the last two step for swapping and : noted that the integral area is the triangle defined by . When we integrate and then , the triangle is described by , and when integrating and then , the triangle is described by .

When we put the transformed integral back and substitute variables into the inequality of , we have:

Divide on both sides simultenously and then we have:

Which is immediately what we are to prove.

The ultimate elementary proof

Then let , and we would like to show:

Lemma

Proof. Actually one should find no difficulty in establishing and thus it's bounded by constant limit superior , or explicitly .

The term can be controlled to be arbitrarily small (otherwise it's a contradiction to ) by sufficiently large , which is asymptotically equivalent to , and thus can also be interpreted as .

This means at any value is smaller than , the term might be large at small values, but must be controllable by , otherwise it conflicts with the definition of .

Corollary
Proof. Just take the argument analogous to we soon have , and therefore . Again, this is taken at any values.
Theorem

Proof. The following property is obvious:

And recall that at every values we have the following inequalities:

So now they can be used to furtherly show the relationship between and that:

Please notice that the properties of and are utilized to bail them out of their own abosolute value brackets, which is due to the amplification of triangle inequalities.

Next, the elementary proof shows the following theorems to be true:

Theorem

Proof. First, by Shapiro's Tauberian theorem with , we have . And if we take it to the Abel's identity, we have:

Which can be fixed into . Next, subtract from both sides we have:

Finally, let's do a change-of-variable. By letting , which indicates , we have:

Therefore, we have , which indicates , and now we are done.

Theorem

Proof. By the Selberg's asymptotic formula, we have:

Where the last minification is due to the fact that .

Noted that , which means there's also , and now lies somewhere in between the interval . Consider their distances to midpoint of the interval, we have:

Which can be furtherly fixed into:

Finally, substitute in with , which indicates , noted that , and then we have:

Divides on both sides and then we have:

Where has been used to eliminate .

Corollary

Proof. Noted that , let , we can see and thus , . While , So we can amplify that:

Now we are done with the proof.

Theorem
In an interval rid of zeroes of , changes its sign for at most once.

Proof. Recall the form of , where will only change its value at each integer points, and may not change if the current integer point is not prime power, recall that , where is non-zero only if is prime power. Meantime, minimizes the magnitude of as increases, and may create zeroes as drops below . So intuitively, the graph of is in sawtooth shape, with each teeth in the shape of for some .

So the behaviour of are only decreasing continously or increasing by hopping at discontinuities. Since hopping will never decrease its values, to change its sign, it must be negative first, which is due to its being negative first, or has already descended below zero. However, the latter case contradicts with the assumption that there's no zero in the interval. So it must only be the former case, in which either does not change its sign at all or change its sign for at most once.

Here comes the final part of the elementary proof, the proof is done by assuming to derive an contradiction:

Theorem (Selberg and Erdos's Elementary Proof)

Proof. The proof is done by assuming and inspecting arbitrary interval with deliberatedly constructed constant stride , defined as below:

Where is the fixed upper bound for we have introduced above.

Consider an arbitrary interval , and in the subinterval , there're three exclusive cases:

  1. has at least one zero in , and we let the first zero be .
  2. is always positive or always negative.
  3. changes its sign for once at .

For the case #1, we have:

Where we let , which fulfils .

For the case #2, we have:

For the case #3, we have:

Both case #2 and #3 can be generalized as the following:

So under any circumstance, there's always:

Finally, for arbitrary , let , and then we have:

Divide on both sides we get:

Take this to the limit superior and then we have:

And thus by assuming we have , which completes the proof.

Corollary (Prime Number Theorem)
Proof. Naturally there's , and since , which is a contradiction to the natural indication, there must be , which indicates by squeeze theorem, which is the sufficient condition of the prime number theorem.

Applications of prime number theorem

Having gone through such a verbose and technical proof of the prime number theorem, we must be eager to know how we can apply it in real life and whether it worths such effort. Actually, We are just about to show how we can apply it in many different ways.

Estimation of least common multiple

One of the most direct application of prime number theorem is to estimate the least common multiple from to asymptotically:

Corollary

Proof. Since yields for every , and otherwise. Thus summing them from to yields .

On the other hand, since , by prime number theorem we know , and thus .

This is obtained by directly using the definition of von Mangoldt's function.

Improving prime number sieves

The conclusions of prime number distribution provides us the tools of evaluating the time complexity of the classical Eratosthenes sieve, and let us know why its improved version, the Linear sieve is better than it asymptotically.

Due to its length, we put it in another text.

March 24, 2024