Quantum - Predictive - Statistics - Risk - AI

Sign in to unlock the full research library

Member-only notes, models, and case studies.

The Riemann Zeta Function: Zeros, the Critical Line, and Computational Exploration

Samuel Castillo
University of Massachusetts Amherst
Predictive Analytics

Introduction

  • For $\Re(s)>1$, the Riemann zeta function is
    \[\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}.\]
  • Euler's product formula links the zeta function directly to the primes:
    \[\zeta(s)=\prod_p\left(1-p^{-s}\right)^{-1}.\]
  • Central thesis: the non-trivial zeros of $\zeta(s)$ govern the oscillatory behavior of prime counting.

From Euler's Basel Problem to Primes

  • Euler solved the Basel problem:
    \[\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6},\qquad \zeta(2)=\frac{\pi^2}{6}.\]
  • This showed that a purely arithmetic series could evaluate to an expression involving $\pi$.
  • Riemann later extended $\zeta(s)$ to the complex plane (except for a simple pole at $s=1$) and connected its zeros to the distribution of primes.

Prime Density and the Big Picture

  • Prime Number Theorem:
    \[\pi(x)\sim \frac{x}{\log x}.\]
  • The zeros of $\zeta(s)$ control deviations from this leading approximation.
  • Related prime phenomena:
    • Mersenne primes: $2^p-1$ with $p$ prime necessary but not sufficient.
    • Twin primes: pairs $(p,p+2)$ such as $(29,31)$.

Visualizing Zeta Function Zeros

  • Non-trivial zeros lie in the critical strip
    \[0<\Re(s)<1.\]
  • The Riemann Hypothesis asserts that all non-trivial zeros lie on
    \[\Re(s)=\tfrac12.\]
  • Three useful visualization modes:
    • Phase plots: hue encodes $\arg(\zeta(s))$ and brightness encodes $|\zeta(s)|$.
    • Contour plots: intersections of $\Re(\zeta(s))=0$ and $\Im(\zeta(s))=0$ locate zeros.
    • 3D surfaces: minima of $|\zeta(s)|$ reveal the zero set geometrically.

Phase Plot (Domain Coloring)

Phase plot domain coloring of zeta function
Hue represents $\arg(\zeta(s))$, brightness represents $|\zeta(s)|$, and zeros appear as phase singularities near $\Re(s)=\tfrac12$.

Three-Dimensional Surface of $|\zeta(s)|$

Three-Dimensional Surface of zeta function
The non-trivial zeros appear as localized minima of $|\zeta(s)|$ rather than as a continuous trench along the critical line.

Numerical Contour Plot in the Critical Strip

Numerical Contour Plot in the Critical Strip
Red curves show $\Re(\zeta(s))=0$, green curves show $\Im(\zeta(s))=0$, and their intersections align numerically with the critical line.

The Critical Line and the Riemann Hypothesis

  • Functional equation:
    \[\zeta(s)=2^s\pi^{s-1}\sin\!\left(\frac{\pi s}{2}\right)\Gamma(1-s)\zeta(1-s).\]
  • This relates $s$ and $1-s$ and extends $\zeta(s)$ to the complex plane apart from the pole at $s=1$.
  • Riemann Hypothesis: every non-trivial zero lies on $\Re(s)=\tfrac12$.

Why the Hypothesis Matters

  • Extensive computation has verified enormous numbers of zeros on the critical line.
  • The zeros enter prime-counting formulas such as
    \[\pi(x)=\mathrm{Li}(x)-\sum_\rho \mathrm{Li}(x^\rho)+\text{lower-order terms}.\]
  • RH implies an optimal-order error term in the Prime Number Theorem:
    \[\pi(x)=\mathrm{Li}(x)+O\!\left(x^{1/2}\log x\right).\]

Prime Density and the Explicit Formula

  • A central bridge between zeros and primes is the explicit formula
    \[\psi(x)=x-\sum_\rho \frac{x^\rho}{\rho}-\log(2\pi)-\frac12\log(1-x^{-2}).\]
  • The zeros contribute oscillatory corrections to the main term $x$.
  • Related asymptotics:
    \[P(n\text{ prime})\approx \frac{1}{\ln n}, \qquad \mathrm{Li}(x)\sim \frac{x}{\ln x}.\]

Computational and AI-Assisted Approaches

  • Numerical contour analysis: approximate zeros and visualize local spacing behavior.
  • Automated theorem search: explore large proof spaces and useful intermediate lemmas.
  • Large-scale verification: test zero locations to increasing heights.
  • These methods do not prove RH, but they expand the range of meaningful experiments.

Cryptographic Motivation

  • Classical ciphers (Caesar shifts, keyword substitution) are broken by brute force or frequency analysis.
  • Modern public-key systems rely on hard number-theoretic problems such as integer factorization.
System Key space / scale Attack Break time
Caesar cipher 25 keys Brute force Instant
Keyword substitution structured Frequency analysis Seconds–minutes
DES (56-bit) $2^{56}$ Exhaustive search Hours–days
RSA-2048 very large modulus Factorization Infeasible classically

Conclusion

  • Euler opened one door into the zeta function through special values such as $\zeta(2)=\pi^2/6$.
  • Riemann opened a deeper door: the zeros of $\zeta(s)$ govern the fine structure of the primes.
  • Computational plots make this connection concrete, even though they do not constitute a proof.

Future Work

  • High-precision numerical approximation of $\zeta(s)$ along the critical line.
  • Improved visualization using domain coloring, contour plots, and surface plots.
  • Computational experiments with truncated explicit formulas for $\psi(x)$ and $\pi(x)$.
  • Exploratory AI-based analysis of zero spacing, clustering, and prime-related data.

Appendix: Python Code for the Phase Plot

import numpy as np
import matplotlib.pyplot as plt
import mpmath as mp
from matplotlib.colors import hsv_to_rgb

mp.dps = 30
re_vals = np.linspace(0.35, 0.65, 500)
im_vals = np.linspace(10.0, 32.0, 700)
Re, Im = np.meshgrid(re_vals, im_vals)
phase = np.zeros_like(Re, dtype=float)
magnitude = np.zeros_like(Re, dtype=float)

for i in range(Re.shape[0]):
    for j in range(Re.shape[1]):
        s = mp.mpc(float(Re[i, j]), float(Im[i, j]))
        z = mp.zeta(s)
        phase[i, j] = float(mp.arg(z))
        magnitude[i, j] = float(abs(z))

phase_norm = (phase + np.pi) / (2 * np.pi)
value = 1.0 / (1.0 + magnitude)
hsv = np.dstack((phase_norm, np.ones_like(value), value))
rgb = hsv_to_rgb(hsv)

Appendix: Python Code for the Surface Plot

import numpy as np
import matplotlib.pyplot as plt
import mpmath as mp
from mpl_toolkits.mplot3d import Axes3D

mp.dps = 30
re_vals = np.linspace(0.2, 0.8, 160)
im_vals = np.linspace(10.0, 35.0, 220)
Re, Im = np.meshgrid(re_vals, im_vals)
Z_abs = np.zeros_like(Re, dtype=float)

for i in range(Re.shape[0]):
    for j in range(Re.shape[1]):
        s = mp.mpc(float(Re[i, j]), float(Im[i, j]))
        Z_abs[i, j] = float(abs(mp.zeta(s)))

Z_plot = np.log1p(Z_abs)
# plot_surface(Re, Im, Z_plot) and save figure as z3d.png

References

  • [1] Bernhard Riemann. "Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse" (On the Number of Primes Less Than a Given Magnitude). Monatsberichte der Berliner Akademie, 1859.
  • [2] Leonhard Euler. Introductio in analysin infinitorum, Volume 1. Marc-Michel Bousquet & Co., 1748.
  • [3] Jacques Hadamard. "Sur la distribution des zéros de la fonction $\zeta(s)$ et ses conséquences arithmétiques". Bulletin de la Société Mathématique de France, 24: 199–220, 1896.
  • [4] Charles de la Vallée Poussin. "Recherches analytiques sur la théorie des nombres premiers". Annales de la Société scientifique de Bruxelles, 20: 183–256, 1896.
  • [5] H. M. Edwards. Riemann's Zeta Function. Academic Press, 1974.
  • [6] E. C. Titchmarsh. The Theory of the Riemann Zeta-Function. Oxford University Press, 2nd Edition, 1986.
  • [7] Xavier Gourdon. "The $10^{13}$ first zeros of the Riemann Zeta function, and zeros computation at very large height", 2004.
Thank you!
Join Predictive Insights
Join Predictive Insights