# How can I plot the normalized distribution of the Riemann zeta zeros?

Given a list of eigenvalues or a list of Riemann zeta zeros, how can I plot this famous plot found here:

On the page referred to, You need to click on "Programs", "The Riemann zeta function" and "Computation of zeros of the Zeta function" and scroll down to find the plot. No direct html link can be provided.

Distribution of spacing between zeros by Xavier Gourdon and Pascal Sebah.

Also I don't know how to tag this question.

• You linking to Computation of zeros of the Zeta function?
– user9660
Commented Oct 6, 2015 at 13:12
• Yes exactly, I was unable to copy paste the link for some reason. Commented Oct 6, 2015 at 13:13
• – user9660
Commented Oct 6, 2015 at 13:22

Let $t$ represent the imaginary part of a zeta zero on the critical line. The asymptotic expansion of RiemannSiegelTheta[t] for large $t$ is

Simplify[Series[RiemannSiegelTheta[t], {t, Infinity, 2}]]


the first term of which is $\frac{1}{2}{\rm Log}[\frac{t}{2\pi}]-\frac{1}{2}$. For large $t$, the phase of the zeta function on the critical line is $\theta(t)=\frac{t}{2} Log[\frac{t}{2\pi}]-\frac{t}{2}$. The instantaneous angular frequency $\omega$ is the derivative of the phase, that is, $\omega = \frac{1}{2} Log[\frac{t}{2\pi}]$. The instantaneous period is $P=2 \pi/\omega=4\pi/Log[\frac{t}{2\pi}]$. Each period $P$ contains two zeros, so the approximate zero spacing as $t\rightarrow\infty$ is the period divided by two, or $2\pi/Log[\frac{t}{2\pi}]$. To normalize the root separation, divide by this number.

NormedZetaZeroSpacing[t_List] :=
Differences[t]*Log[Most[t]/(2 \[Pi])]/(2 \[Pi])


Generate the imaginary parts of some zeros.

t = ParallelTable[N[Im[ZetaZero[k]]], {k, 1, 40000}];


Plot the histogram.

Histogram[NormedZetaZeroSpacing[t], {0.02}, Frame -> True,
AspectRatio -> 1/1.5,
FrameLabel -> {"Normalized Zero Spacing", "Number"},
BaseStyle -> {FontSize -> 12}, PlotRange -> {{0, 3.0}, All},
PlotLabel -> "Normalized Spacing of First 40000 Zeros of Zeta Function"]