In a previous post I defined the famous *Riemann zeta function*,

Today I want to give you a glimpse of what it has to do with prime numbers—which is a big part of why it is so famous.

Consider the infinite product

where each sequential factor has the next prime number raised to the power. Using big-Pi notation, we can write this infinite product more concisely as

(The big means a roduct just like a big means a um.)

Now let’s do a bit of algebra. First, recall that the infinite *geometric series* has the sum

as long as . (For some hints on how to derive this formula if you haven’t seen it before, see this blog post or this one.) Of course, is of this form, with . Note that which is less than as long as , so the geometric series formula applies, and we have

(From now on I’ll just write instead of .) That is,

So this is an infinite product of infinite sums! But you’re not scared of a little infinity, are you? Good, I thought not. Now, what would happen if we “multiplied out” this infinite product of infinite sums? Note that every term in the result would come from picking one term of the form from each of the factors, one for each prime , and multiplying them. (Though infinitely many of the choices have to be if we are to get a finite term as a result.) For example, one way to choose terms would be

which would give us . In fact, because of the Fundamental Theorem of Arithmetic (every positive integer has a distinct prime factorization), each choice gives us the prime factorization of a different positive integer, and conversely, every positive integer shows up exactly once. That is, after multiplying everything out, we get one term of the form for each positive integer :

But that’s just our old friend ! So in fact,

turns out to be an equivalent way to write the Riemann zeta function.

We can now use this in a really cute proof that there are infinitely many primes. Consider , where we substitute for . In our original definition of , we get

This is known as the *harmonic series*, and it is a well-known fact that it *diverges*, that is, as you keep adding up more and more terms of the series, the sum keeps getting bigger and bigger without bound. Put another way, pick any number you like—a hundred, a million, a trillion—and eventually, if you keep adding long enough, the sum will become bigger than your chosen number. (Though you may have to wait a *very long time*—the harmonic series diverges rather slowly indeed!) One way to prove this is to note that the series is *greater than*

(the original series is greater than this because we only made some of its terms smaller—I changed the into , and then changed through into , and then through into , and so on). But this new *smaller* series is equal to which will clearly get arbitrarily large. So the harmonic series, which is larger, must diverge as well.

So, diverges. But what happens if we plug into the other expression for ? We get

If there were only finitely many primes, this would be a finite product of some fractions and would thus have some definite, finite value—but we know it has to diverge! Thus there must be infinitely many primes.

I will note one other thing—when I was writing up some notes for this post I was initially confused by the fact that if we set, say, , we already know that ; but now we also know that

But this is an infinite product of fractions which are all bigger than ! How could it converge? …well, my intuition was just playing tricks with me. Although I have lots of practice thinking about infinite *sums* that converge, I am just not used to thinking about infinite *products* that converge. But in the end it is not really any more surprising than the fact that an infinite sum can converge even though all its terms are positive: as long as the fractions are getting smaller quickly enough, such an infinite product certainly can converge, and in fact it does. Using a computer confirms that the more terms of this product we include, the closer the product gets to

From the last computation you can also note that the fact that is irrational implies that there are infinitely many primes (because a finite product of rational numbers is rational).

Ah, good point! Though I have to ask — how do you know that is irrational?

Let’s assume that x = pi^2/6 is rational. Then, pi = sqrt(6x), which is merely irrational, not transcendental. So, it seems that we’ve reached a contradiction 🙂

P.S.: The above actually proves a stronger result: pi^2/6 must be transcendental.

Indeed, so this depends on knowing is transcendental — a rather big result! Using the transcendence of to prove the infinitude of the primes is like dropping an anvil on a mosquito. (Which can be rather fun, of course.) (Though to be sure, I don’t know whether the proof of the transcendence of already depends on the infinitude of primes…)

Good point! 🙂 Our of curiosity I decided to check the proofs of the transcendence of pi, and the first one I found does indeed seem to depend on the infinitude of primes: https://en.wikipedia.org/wiki/Lindemann%E2%80%93Weierstrass_theorem — it requires picking a sufficiently large prime p in one of the preliminary lemmas. Crazy!

Hah! Good detective work. So this doesn’t work after all — pity! On the other hand, it’s quite possible there is a more elementary way to establish that is irrational, but I am not sure. I know how to prove is irrational, but off the top of my head I don’t see an easy way to modify the proof to work for . (The proof depends on the fact that and vanish at ; so the modified proof would have to involve a function that vanishes at , but functions like would make things really messy since you end up taking iterated derivatives.)

I’d be interested to see the proof if you manage to make it work!

Oh, I’m not going to spend any more time on it! But if you want to see the proof of the irrationality of pi, go to https://mathlesstraveled.com/post-series/ and scroll down to “Irrationality of Pi”. (Or you can just read the original paper by Niven here: http://projecteuclid.org/euclid.bams/1183510788 .)

Great, thanks!

I haven’t thought about infinite products converging before but I was just wondering if it is possible to analyze convergence of infinite products by taking their `log` version and looking at the infinite sum instead?

Good question! I am not an expert in this area, but I can’t think of any reason why this wouldn’t work.

Indeed, this is generally the way that the convergence of infinite products is handled. By definition (or, at least, by the usual definition), an infinite product is said to converge if and only if the corresponding sum converges. Note that this implies (for example) that the infinite product does NOT converge. In general, in order for an infinite product to converge, it cannot “converge” to either 0 or infinity!

I think you meant to say ‘greater than’ when you compared the harmonic series to 1 + 1/2 + (1/4 + 1/4) + …

Good catch, thanks! Fixed now.