The magic of mathematics and theoretical computer science is all the unexpected connections. You start looking for general principles and then mysterious connections emerge. Nobody can say why this is. — Robert Endre Tarjan

Riemann zeta function is a rather simple-looking function. For any number , the zeta function is the sum of the reciprocals of all natural numbers raised to the power.

Although the variable is a complex number, for the sake of simplicity, we will treat as real. (Real numbers are a subset of complex numbers.)

Now let us multiply both sides of the above equation with , which gives us

Now let us subtract the second equation from the first one, getting

Thus we have removed all terms of the form from the right hand side, for . Next, if we multiply the above equation with and then subtract the result from the first equation, all terms of the form will be from the right hand side, and we will get

We can continue in this fashion with all remaining prime numbers . In the end, we will get

which implies

Thus we come to this wonderful relationship. On one side, powers of all natural numbers, in sum form. On the other side, powers of all prime numbers, in product form. And they are equal! You can take reciprocals of all prime numbers, raise each to the power , subtract each from , multiply them all … and you get the sum of the reciprocals of all natural numbers, each raised to the same power. Primes are the building blocks of natural numbers.