We've seen the calculus version
of the Euler product, and we know how to express as a product over its roots
High time we put everything together -- the reward will be the long expected explicit formula for counting primes!
First, let's bring the two formulae for together and rearrange them such that we obtain a formula for :
Before we proceed, let's get rid of this unnecessarily complicated factor . Using the formula above, this is
The value of can be obtained in a similar fashion to that of by interpreting it as the sum
which winds up to be, somewhat surprisingly, , giving us .
In our formula for , we have , so it appears wise to take logarithms of both sides. Remembering that the logarithm translates products into sums we obtain
If you're scared by this expression, remember that we need to plug it into our integral to get back to . Prime research is only for the valiant. But before we can do this, we first need to transform the integral slightly (through partial integration) to
Now we can substitute the term by the above sum. Luckily, both differentiation and integration are transparent to addition, hence we can handle five (slightly) less intimidating integrals instead of one monster integral.
The derivation of these terms fill the better part of the second half in Riemann's paper, so I'm not gonna give a full account of the intricate arguments required to arrive at the final terms, but will instead be satisfied with a few remarks on each of them.
Let's start with the easiest one as an appetiser. The term will simplify to when divided by , and then vanish completely when differentiated with respect to . Nice! Unfortunately, the other terms won't behave nearly half as nicely as this one.
Another one, however, is still reasonably well behaved. The term when plugged into the integral, gives us
If you follow all steps through, this all just boils down to -- not too bad either.
OK, now let's roll up our sleeves, and get on with the real troublemakers. The next term we consider is which yields the integral
This integral is by no means easily simplified, so I'll just present you with the final version which is1
The function is also called the logarithmic integral, and will turn out to be the main term in our formula for , and a great approximation for the number of primes less than in general. I've mentioned it before, and interpreted there as the density of the primes "near" . This means we need to sum, or rather integrate, along all values of to obtain the total number of primes. Those working with (continuous) probabilities will be familiar with the concept.
All these words just to avoid admitting that I won't work out more details about the derivation of the main term at this point. Luckily, we still have more work to do anyway. Next, let's look at the sum over the roots . The tricky bit here is that we would like to take the sum out of differentiation and integration, but this is not so straightforward since the sum only converges conditionally and hence care needs to be taken when interchanging limits. So, we are grateful to all the smart minds who did the hard work for us, and go on exchanging the order to obtain
I hope you see the resemblance to the expression above that led to the main term, so we will expect a similar result. The main difference is that, as noted, the convergence of the sum is only conditional, and hence the order in which the zeros are summed does matter. So, which is the right order?
Remember that zeros come in "pairs of pairs" since has two symmetries. First, it is symmetrical along the real axis, that is , where is the complex conjugate which is nothing but the mirror image along the real axis. Since every single zeros that's been found is of the form , where is a real number, this means that every zeros has a "twin" .
But there is another symmetry, the symmetry along the critical line . The function has been defined such that . This means that for every zero we have another zero . For a zero on the critical line, this is actually the same "twin" , but if there's any zero off the magical line, this will yield a total of three distinct other zeros associated with , which are , , and .
Back to our original topic, we wanted to find the right order of summation. When it comes to summing real values, usually the right thing to do is to sum in increasing order. Unfortunately, the zeros are complex and hence have no natural order. However, we know they are condensed to the critical strip, and we will just sum them up according to their imaginary part. But that's not enough -- we will also need to pair each zero with one of it's "twins". It turns out the right one is , the mirror image with respect to the point .
All this combined with some more careful analysis, we arrive at the penultimate term in our expression for :
This leaves the term and the corresponding integral
There's a series for that translates this integral into a series of integrals, each one similar to the ones we have seen before. Summing these up again, we arrive at the final term
This may look scarier than it is, particularly since this integral grows small very quickly and will thus be asymptotically negligible.
It's high time we wrapped up things and take a look at the result of all this madness:
This is Riemann's main result, and here are two things (amongst others) that make it so remarkable (not counting the fact that Riemann didn't bother to rigorously prove half of the steps along the way).
First, the "main" term. I put main in quotes, because just by looking at it, one couldn't tell which of these terms dominates. But remember that by the mid 19th century, the Prime Number Theorem has been unproved for half a century, and this was the first real justification (beyond empirical data, that is) in conjecturing that the density of the erratic primes would be given by a formula as simple as . You may point out that we didn't actually count primes with , but indeed prime powers. However, we will take a closer look into this, and it will not be a big difference anyway. For the moment, just be reminded that we can recover from through Möbius inversion.
Second, the zeta zeros. When Gauss and Legendre conjectured their versions of the Prime Number Theorem, it was surprising to have any kind of simple asymptotic for the number of primes. Riemann's result goes on step further. He did not approximate the number of primes, he computed them exactly. There's no uncertainty or error attached to this formula, if you diligently carry out every single calculation you will end up with the exact number of primes below , not just a rough guess. Now, what does it mean to carry out all calculations? The logarithmic integral , though not quite elementary, is still quite easy to handle. The same goes for the integral and, well, is just a constant. All these terms can be evaluated to any desired precision by any modern computer. The series over the zeros however is a little different. We know that there's an infinite number of zeta zeros, which means that no machine can ever find the exact value of this term, no matter how much time (or money) you spend on it. Still, a truncated series can still be used to approximate the final value, and in this respect every zero that we add to the calculation makes Riemann's formula more accurate. Note how every single zero carries its individual secret about the primes in it, and they all come together to unravel the prime mystery, like notes in a beautiful symphony that form the music together.
I hope this glimpse of beauty makes up for all the toiling and sweating with the nasty integrals...
You may -- rightfully -- remark that during integration, the integrand 1/log t is undefined for t = 1 since log 1 = 0, and we cannot divide by zero. But rest assured that this is just another technicality that's easily circumvented. In fact, it's never quite sure which version an author works with: the integral that starts at 0 or the one that starts at 2. However, these two just differ by an additive constant, which is completely negligible when it comes to the asymptotic behaviour. ↩