# The riemann hypothesis and its relation to the distribution of prime numbers

Last changed: 10.02.2021
QuantaMagazine | NumberPhile | 3Blue1Brown | Wikipedia | University of Exeter, Mr Watkin (mirror)

This is the zeta function:

$$\zeta(z) = \sum\limits_{n=1}^{\infty} \frac{1}{n^z}$$

Here, $$z$$ is a complex number $$z = a + ib$$. How do we take a complex number to the power of a natural one?

Four mathematical rules are necessary to work that out. May $$x, y, a, b, m \in \mathbb{R}$$ and $$m > 0$$ and $$i = \sqrt{-1}$$ then:

• $$x = e^{ln(x)}$$
• $$log_{m}(x^y) = y * log_{m}(x)$$
• $$x^{a+b} = x^a * x^b$$
• Euler's Formula: $$e^{ix} = cos(x) + isin(x)$$
Steps:
1. $$x^{a+ib} = e^{ln(x^{a+ib})}$$
2. $$= e^{(a+ib) * ln(x)}$$
3. $$= e^{aln(x) + ibln(x)}$$
4. $$= e^{aln(x)} * e^{ibln(x)}$$
5. $$= e^{ln(x^a)} * e^{ibln(x)}$$
6. $$= x^a * e^{ibln(x)}$$
7. $$= x^a * (cos(bln(x)) + isin(bln(x)))$$
8. $$= x^acos(bln(x)) + x^aisin(bln(x)))$$

Here is what the zeta function looks like in javascript:  

function zeta(z, limit){
var zres = new Complex(0, 0);
for(var x = 1; x <= limit; x++){
var ii = z.imaginary * Math.log(1/x);
var pp = Math.pow(1/x, z.real);
zres.real += pp * Math.cos(ii);
zres.imaginary += pp * Math.sin(ii);
}
return zres;
}

 

$$\zeta(z)$$ converges for $$Re(z) > 1$$. Try it out below. You can move and zoom the coordinate system if the simulation is running.

We get a more complete picture when observing how the zeta function changes the the entire complex plane by visualizing more points.

Enter an interval and the density of points.

The zeta function converges only for values $$Re(z) > 1$$. By analytically continuing it to $$\zeta(z) = \frac{1}{z-1}\sum_{n=1}^{\infty}(\frac{n}{(n+1)^z} - \frac{n-z}{n^z})$$ we can expand the space for convergance to $$Re(z) > 0$$ excluding $$Re(z) = 1$$.

For some values in $$0 < Re(z) < 1$$ the zeta function equals to zero. Riemann hypothesized that all those zeros have a real value of $$0.5$$. Here the black dots along 0.5 are evaluated by the extended zeta function and rendered in red. Some of them converge to $$0 + 0i$$. These are the non trivial zeta zeros.

The function $$\psi(x) = \sum_{n \leq x}^{} \Lambda(n)$$ was introduced by Chebyshev, which counts all powers of primes. Each $$p^k, k \in \mathbb{N}$$ is weighted $$\log(p)$$. (Seen in black)

This function can also be expressed with a sum of the non trivial zeta zeros $$\rho$$. Thats all places the zeta function evaluates to 0,0 when its real input was between 0 and 1. $$\psi_{0}(x) = x - \ln(2\pi) - \sum_{\rho}^{\infty}{\frac{x^\rho}{\rho}} - \frac{1}{2}\ln(1-\frac{1}{x^2})$$

As all non trivial zeros come in conjugate pairs e.g. $$0.5 + 14.13i$$ and $$0.5 - 14.13i$$, the imaginary part cancels out and we are left with a real function. (Depicted in red)