Zeros and primes
Zeros and primes
The primes go into ζ(s) through Euler’s product. They come back out through the zeros: each conjugate pair of zeros adds one wave to the prime-counting staircase. Drag the slider to add zeros yourself.
Figures on this page
Every thumbnail is computed from real data or cited tables. Click to jump to the full figure and its provenance caption.
Primes and the Euler product
Settled Every integer greater than 1 factors into primes in exactly one way, up to order. Euler turned that unique factorization into an identity of functions. For real part greater than 1, the series over the positive integers and the product over the ordinary primes are the same function.
ζ(s) = Σ n^(−s) = Π_p (1 − p^(−s))^(−1), for Re(s) > 1.
Building the product one prime at a time
Each prime contributes one factor, 1/(1 − p−s). The animation multiplies them in one at a time, starting from the empty product (just 1), and compares the running product with the true size of ζ(s) on two vertical lines to the right of the critical strip. Drag the step slider to stop at any prime.
Figure 1 Euler product, prime by prime Settled
- Settled Each factor expands as 1 + p−s + p−2s + …. Multiplying the factors for all primes produces every term n−s exactly once, because every integer factors into primes in exactly one way. After the primes up to P, what is still missing is roughly the size of P1−σ, so the product settles quickly at σ = 2, slowly at σ = 1.2, and not at all at σ = 1 or to its left.
- Settled Computed here On σ = 2, the prime 2 alone already gets within 19% of |ζ| everywhere in the window. The first 15 primes (up to 47) get within 0.39%, and all 1229 primes below 10 000 get within 0.001%. On σ = 1.2 the same steps give 68%, 27% and 5.9%. Ten thousand is not nearly enough there.
- Settled Computed here On σ = 1.2, six of the seven dips in |ζ| sit within 0.15 of the height of one of the first six zeros on the critical line (t = 14.13, 21.02, 25.01, 30.42, 32.94, 37.59; red marks). The dip near t = 3 has no zero above it. Settled Caveat The zeros cast a shadow to the right that the primes can reproduce, but the product never reaches the zeros themselves: they lie where the product does not converge. This is a picture, not a zero detector, and it says nothing about the Riemann Hypothesis.
The harmonic series is the case s = 1. It diverges, so the product diverges, so there are infinitely many primes. That argument is eighteenth-century. It is not the Riemann Hypothesis.
At s = 1 the continued function has a single simple pole, with residue 1. Riemann’s 1859 memoir continues ζ(s) to a meromorphic function on the whole plane. Inside the critical strip the primes are still in the function, but not by substituting a real part of 1/2 into the product. They re-enter through the explicit formula below.
ξ(s) = (1/2) s(s−1) π^(−s/2) Γ(s/2) ζ(s), and ξ(s) = ξ(1−s).
Figure 2 Completed ξ on the critical line Settled
mpmath.zetazero). The curve draws itself on load; motion is off if your system asks for reduced motion. Settled Ξ is real and even for real t, and its zeros are exactly the nontrivial zeros’ ordinates — theorems; the plot is a check on a finite window.- Settled Why Ξ is real: the factors in ξ cancel the complex phase of ζ on the critical line, just as Hardy’s Z does. Plotting Ξ therefore shows sign changes, not only a modulus touching zero.
- Settled Why Ξ is even: ξ(s) = ξ(1 − s) together with conjugation symmetry forces Ξ(−t) = Ξ(t). The mirror image across t = 0 in the figure is that identity, not a coincidence of the window.
- Settled The zeros of Ξ on the real t-axis are exactly the imaginary parts of the nontrivial zeros of ζ. The Riemann Hypothesis is the claim that every nontrivial zero has real part 1/2 — equivalently, that every zero of Ξ is real. Open Whether every zero of Ξ is real.
A gas whose partition function is ζ
Physicists describe a hot gas with a partition function: add up e−β·energy over every state the gas can be in, where β is one over the temperature. In 1990 Bernard Julia, and independently Donald Spector, noticed a toy gas that turns this into ζ. Give it one kind of particle per prime p, with energy ln p, and let any number of them pile up. A state of the whole gas is then a whole number n (its prime factors say which particles are present), its energy is ln n, and the partition function is 1 + 1/2β + 1/3β + … = ζ(β). That is Euler’s product, read as physics. It is called the primon gas.
At β = 1, ζ has its one pole, so the partition function blows up and the gas cannot be cooled below that point. In 1995 Jean-Benoît Bost and Alain Connes built a sharper version, a quantum system with the same partition function but also a symmetry group, and proved that something real happens at β = 1. When it is hot (β ≤ 1) there is exactly one equilibrium state, and it is symmetric. When it is cold (β > 1) there are many, and the symmetry group shuffles them, so picking one breaks the symmetry. That is spontaneous symmetry breaking, the same idea as a magnet choosing a direction when it cools, here with ζ as the partition function.
Figure 3 A gas whose partition function is ζ
- Settled The primon gas identity Z(β) = ζ(β) for β > 1 is exact; it is Euler’s product written as a gas of free particles (Julia 1990; Spector 1990, who also read the Möbius function as the physicist’s “fermion sign”).
- Settled Bost–Connes (1995), main theorem: for 0 < β ≤ 1 there is a unique equilibrium (KMS) state; for β > 1 the extreme equilibrium states are permuted by the symmetry group, which is the Galois group of the field made by adjoining all roots of unity to the rationals, Gal(Qab/Q) ≅ Ẑ*. The cold states, fed arithmetic inputs, output roots of unity, a link to class field theory.
- Open Not a route to RH, as far as is known The transition sits at the pole, β = 1 on the real axis. No result connects this symmetry breaking to where the nontrivial zeros lie. Connes later built a different program on related spaces that restates RH, without proving it; the Hypothesis stays open.
The explicit formula
Deninger has proposed a dynamical counterpart of this identity: a transversal index, or Lefschetz, trace formula for a flow on a foliated space, with closed orbits in the role of primes. The correspondence is a published proposal; the space that would make it a theorem about ζ has not been constructed, and it is not a proof of RH. Illustrated primer: Foliations and Deninger’s picture.
Settled Theorem about whatever zeros exist It does not force those zeros onto the line.
Write ψ(x) for the Chebyshev function: the sum of log p over prime powers pk ≤ x. It is a staircase that tracks the primes, weighted so that a prime power pk contributes log p. The explicit formula writes that staircase as a smooth main term plus a sum of oscillations, one from each nontrivial zero.
ψ(x) = x − Σ_ρ x^ρ/ρ − log(2π) − (1/2) log(1 − x^(−2)).
The picture below is that identity cut off after five conjugate pairs, and again after the twenty pairs just computed. The staircase is exact: ψ(x) is the sum of log p over prime powers pk ≤ x. Both smooth curves use the classical formula. The imaginary part of the zero-sum cancelled to numerical noise, so the arithmetic is stable. The remainder does not shrink at every x.
x − Σ x^ρ/ρ − log(2π) − (1/2) log(1 − x^(−2)), summed over the first five pairs, and separately over the first twenty.
Figure 4 Explicit formula, 5 and 20 pairs Settled
Figure 5
Figure 6 Interactive: choose N pairs Settled
Interactive · computed in your browser
This figure needs JavaScript. The two static figures above show the same computation for N = 5 and N = 20.
Settled Why a longer sum need not help at every x Each omitted zero contributes a term of size about xβ/|ρ| that oscillates in log x. Adding the next conjugate pair is adding another wave, not subtracting a positive remainder. At a fixed x those waves can reinforce or cancel the current residual. That is ordinary Fourier-style arithmetic, not a defect of the computation. It is why the residual figure above does not fall steadily as N grows, and why the five-pair and twenty-pair curves can trade places depending on x. The full sum is an identity about the zeros that exist. A finite truncation is not a monotone approximation of that identity, and it is not a proof that every zero has real part 1/2.
The intuition is ordinary complex arithmetic. If a zero is ρ = β + iγ, then
x^ρ = x^β (cos(γ log x) + i sin(γ log x)).
On the critical line, β = 1/2, so the wave has size about √x divided by |ρ|. A zero with real part β > 1/2 would leave a larger ripple, of size about xβ. The primes would then fluctuate more than the square-root scale. In that precise sense the zeros control the irregularity of the primes: the explicit formula is an identity, and the real parts of the zeros are the exponents in its error.
The identity holds for the zeros that exist, wherever they sit in the strip. Moving a zero off the line changes the size of its term. It does not break the formula. So the formula explains why the location of the zeros matters. It is not itself a proof that they all have real part 1/2.
Octonion counts: which count hears the zeros?
[project, exact from established factors] First choose what is being counted. Our octonion orders have global ideal zetas ZK(s)=ζ(8s)CK(2−s). It is tempting to rebuild the ordinary ideal count from that pole and those zeros. But zeros do not contribute residues to the integral for the ordinary count. Here the count is simpler: a finite sum of rounded eighth roots, with an error that stays bounded forever.
Write AK(x) for the number of right ideals of additive index at most x, and CK(z)=Σ cjzj. An ideal means a finite-index additive lattice L with L·K⊆L, as on the global octonion page; octonion multiplication need not be associative.
A_K(x) = sum_j c_j floor((x/2^j)^(1/8)); −C_K(1) < A_K(x) − μ_K x^(1/8) ≤ 0.
[known / project adaptation] Zeros enter a different observable. Taking −Z′/Z makes each zero into a pole. Its coefficients are signed weights, not numbers of ideals or octonion prime ideals. Their summatory function B has two parts: eight times the ordinary prime-power staircase at x1/8, plus a separate contribution supported only at powers of 2.
Figure 7 Octonion counts: which count hears the zeros?
The zero waves belong to B, not A
Define bK(k) by zC′K(z)/CK(z)=Σ bK(k)zk. Initially far enough to the right, −Z′/Z equals 8(−ζ′/ζ)(8s)+(log2)zC′/C. Therefore its half-weighted summatory function is exactly:
B_K,0(x) = 8 psi_0(x^(1/8)) + (log 2) sum*_{2^k ≤ x} b_K(k).
[known] Substitute y=x1/8 in the classical explicit formula above. Its main term becomes 8x1/8, and an inherited zero contributes −xρ/8/(ρ/8). For a checked pair ρ=½±iγ, the carrier size is x1/16 and frequency in log x is γ/8. A zero off the ordinary half-line, if one exists, would give a different exponent. We use only the first 100 already-certified pairs; we assume nothing about all other zeros.
The prime-2 part is not necessarily a small wobble. At index16 its signed weights b4 are −39,−446,−14,0 for G,S₁,R,E₈. Negative jumps are one reason not to call B a prime-ideal count. Some local zeros have real parts much larger than 1/16, so their diagnostic terms can dominate the inherited waves.
How the local zero columns rebuild the signed jumps
If C(z)=Π(1−αz), then bk=−Σαk. For nonintegral u=log₂x and m=⌊u⌋, the entire local contribution is the finite geometric sum −(log2)Σα(1−αm)/(1−α). Each α also gives a vertical zero column sn=(Logα+2πin)/log2, with spacing 2π/log2 in imaginary height. The exact same contribution is (log2)C′(1)/C(1)−ΣcolumnsΣnxsₙ/sn, with a symmetric column-index limit. At jumps use midpoint values.
The notes prove this Fourier identity and check finite column cuts independently. A column has an exponential carrier times a periodic modulation in log₂x; the whole sum need not be purely log-periodic. These columns belong to the signed diagnostic, not to the ordinary ideal-count error.
[project, computed] The exact counts agree through bound 2128 by finite-correction and odd-part algorithms, plus a separate 394,809-event enumeration at that bound. Every integer prefix through 218 was checked. Signed local coefficients through k=128 agree by polynomial division and integer matrix traces. On the plotted grid, normalized RMS errors for 5,20,100 inherited pairs are 0.149,0.109,0.066; more terms need not improve every point. Double/110-digit evaluations differ by less than 1.7×10−12.
What this adds to the program. It separates all-ideal counting from a zero-sensitive signed diagnostic. Once its exact prime-2 part is removed, B is simply the classical prime-power count with a rescaled input. New odd-prime information would require another order family or another explicitly defined counting object—not a new interpretation of these same waves. Orders that are imperfect at 3 now supply such odd-prime terms. Next mathematical questions concern controlled smoothing/truncation and an arithmetic explanation of the local polynomial, not an RH claim.
Proofs, scope and independent checks · computation · exact counts and plotted data · Kedlaya, analytic number theory notes, Theorem9.9. Classical textbook reference: Davenport, Multiplicative Number Theory, §17. This is factor-derived computation, not a new enumeration of ideal lattices.
How far the primes stray: π(x), li(x) and R(x)
What RH would imply for these error terms is summarized on the Riemann Hypothesis page.
Open Conditional These are consequences of RH, or equivalents of it. They are not theorems of this project, and they are not known unconditionally at this strength.
What is unconditional, and visible on a small range, is that π(x) tracks the logarithmic integral. The curve is mpmath.li, the Cauchy principal-value li(x). The staircase is a sieve. Recomputed 3 October 2026 PT out to 1000. Checkpoints: at 10, π = 4 and li ≈ 6.166; at 100, π = 25 and li ≈ 30.126; at 200, π = 46 and li ≈ 50.192; at 500, π = 95 and li ≈ 101.794; at 1000, π = 168 and li ≈ 177.610. On this range li(x) sits above π(x). That is a picture of the prime-number theorem’s main term. It is still far too short to test the square-root error the Hypothesis would give, and it is not offered as evidence for the Hypothesis.
Figure 8 π(x) and li(x) Settled
The signed difference itself, out to 10 000, is the next figure. Recomputed 4 October 2026 PT: sieve for π(x), mpmath.li for the principal-value logarithmic integral, sampled every 5 from 2 to 10 000. Verified: π(1000) = 168 and π(10 000) = 1229. Checkpoints for li − π: at 100, ≈ 5.126; at 1000, ≈ 9.610; at 5000, ≈ 15.281; at 10 000, ≈ 17.137. On this grid every sample stayed positive. The largest absolute error on the grid was about 23.336, at x = 8622. No sign change was found. Skewes-type crossings of π past li are known to exist eventually, but they lie far beyond this plot. The range is still far too short to see the oscillations that would test the square-root error under RH, and the figure is not offered as evidence for the Hypothesis.
Figure 9 li(x) − π(x) to 10 000 Settled
Riemann’s R(x): a better smooth guess
Settled Settled definition, computed comparison Riemann himself proposed a sharper smooth approximation than li(x). It corrects for prime powers, which li over-counts, using the Möbius function μ:
R(x) = Σ μ(n)/n · li(x^(1/n)) = li(x) − (1/2) li(√x) − (1/3) li(x^(1/3)) − …
mpmath.riemannr. The explicit formula says π(x) equals R(x) minus a sum over the zeros (plus small terms), so R − π is the part the zeros have to write.Figure 10 R(x) against li(x) Settled
mpmath.li and mpmath.riemannr (mpmath 1.4.1, 25 digits), sampled every 5 from 2 to 10 000 (2004 samples). R − π at the red dots: +0.662 at 100, +0.359 at 1000, −0.054 at 5000, −2.069 at 10 000, where π = 1229 and R ≈ 1226.931. On this grid max |R − π| ≈ 5.41 (at x = 9932), against max |li − π| ≈ 23.34 (at x = 8622); the mean absolute error is about 1.31 for R and 14.49 for li. R − π is positive at 48.4% of samples, so unlike li − π it changes sign many times. Settled A better main term on a short range. Open Not a test of the Hypothesis: R is not always closer than li, and no bound on the error is drawn.- A classical equivalence, with one direction due to von Koch (1901), is that RH holds if and only if ψ(x) = x + O(x1/2 log2 x). In the same circle of ideas, π(x) = Li(x) + O(x1/2 log x). The prime number theorem is the weaker, proved statement that the error in ψ(x) is o(x). That follows from the zero-free line Re(s) = 1. RH would replace “little-o of x” with a square-root bound.
- Under RH, consecutive prime gaps satisfy pn+1 − pn = O(√pn log pn), a theorem of Cramér. Unconditional bounds are of the shape O(pnθ) for some θ > 1/2. RH would bring the exponent down to the square root.
- RH implies the Lindelöf hypothesis, a bound on how fast ζ grows on the critical line. Lindelöf is weaker. It does not imply RH.
Reading path · step 8 of 13
