Gap-Class Decomposition of ζ(2) = π²/6

A Partition of the Euler Product by Prime Gap Class: Numerical Evidence and Open Questions
Wessen Getachew  ·  2026
MSC 2020: 11M06  ·  11N05  ·  11A41  ·  Interactive Tool  ·  Modular Sieve  ·  Composite  ·  Transform  ·  ζ Riemann Zeros
: MOD N | GAP
gcd(r, m) = 1
gcd(r, m) > 1
■ Farey Structure Statistics
■ What This Shows

Each rational r/m with 0 ≤ r ≤ m, 1 ≤ m ≤ N is placed at angle 2πr/m on ring m. Blue points satisfy gcd(r,m)=1 — these are the Farey fractions. By the Franel-Landau theorem, if the Farey discrepancy DN fails to decay at the rate O(N−½ log N), then ζ(s) has a zero off the critical line. The observed near-uniformity at finite N is consistent with RH; it is not a proof of it. Red points (gcd(r,m)>1) are the composite residues; they sit at angles 2πr/m where r and m share a common factor, concentrating at rational multiples of 2π that correspond to the divisor structure of m.

The cross-mod connections follow residue r across rings N→1, tracing the channel each residue class cuts through the modular hierarchy. The ring polygon connects consecutive residues on a single ring: mod 4 with all points gives a square; gcd=1 only at mod 4 leaves r=1 and r=3, a diameter. At mod 8 with gcd=1, the units 1,3,5,7 form a square — the polygon degree drops from 8 to 4 because only the reduced residues remain.

The gap overlay marks the pairs (p mod N, (p+g) mod N) for primes with forward gap exactly g. Outer-ring chords show which residue classes carry twin, cousin, or sexy prime pairs. The inward spiral traces the full cross-mod ancestry of each endpoint back through rings N→1.

Abstract

Two structures of the prime numbers are examined in parallel: a geometric diagram of modular residue arithmetic organized by the Farey sequence, and a factorization of the Euler product ζ(2) = π²/6 by prime gap class. Neither constitutes a proof of any conjecture. Both are verified computations on classical objects.

I. Modular Residue Rings

The diagram places every rational r/m with 1 ≤ m ≤ N at angle 2πr/m on ring m, making the Farey sequence geometric. Fractions with gcd(r,m) = 1 (blue) are the reduced Farey fractions. By the Franel-Landau theorem, any systematic bias in their angular distribution — measured by the discrepancy DN — implies a zero of ζ(s) off the critical line. Their observed near-uniformity at finite N is consistent with RH, not evidence for it in a formal sense. The composite residues gcd(r,m) > 1 (red) concentrate at angles that are rational multiples of 2π, tracing the multiplicative structure of the integers across rings.

Cross-mod connections follow each residue r through rings N→1. With gap g active, the overlay marks the pairs (p mod N, (p+g) mod N) for primes with forward gap exactly g. Outer-ring chords show which residue classes host twin, cousin, or sexy prime pairs; the inward spirals show the full divisibility structure beneath each endpoint.

II. Gap-Class Decomposition of ζ(2)

Euler's product ζ(2) = π²/6 = ∏p p²/(p²−1) converges absolutely, so its factors may be rearranged freely. Grouping by forward gap — the distance from each prime to the next — gives ζ(2) = ∏g Pg, where Pg = ∏{p : gap(p)=g} p²/(p²−1). This is a reorganization of a known result, not a theorem. Its value is numerical: it makes the weight of each gap class in the Euler product directly measurable.

At N = 400 million, gap class 1 (the prime 2 alone, contributing the fixed factor 4/3) accounts for 57.8% of log ζ(2). Gap class 2 (twin primes) accounts for a further 34.8%. Together they explain over 92% of the total. A structural question follows: if the twin prime set were finite, P2(s) would be a finite product of factors ps/(ps−1), holomorphic on all of ℂ and bounded away from zero for Re(s) > 0. The remaining sub-products would then have to account for the poles and zeros of ζ(s) entirely — whether this is analytically possible via the identity ζ(s) = ∏g Pg(s) appears to be open.

ζ(2) = ∏p prime p²/(p²−1)  =  ∏g ∈ G Pg  =  π²/6 ≈ 1.644934066848…

G = {1, 2, 4, 6, 8, …} is the set of all realized prime gap sizes.   Pg = ∏{p : gap(p)=g} p²/(p²−1).

Gap-Class Partition

Define gap(pn) = pn+1 − pn. By absolute convergence:

Pg  =  ∏{p : gap(p) = g} p²/(p²−1)

Gap class g = 1 contains only the prime 2, since gap(2) = 3 − 2 = 1, giving the factor 4/3 exactly. Every other realized gap is even, since all primes beyond 2 are odd.

Gap Classification

Open Questions

  1. Quantitative weight: At N = 400M, gaps 1 and 2 together exceed 92% of log ζ(2). How does this proportion behave as N → ∞?
  2. Closed form for P2(2): The partial product over the first 400M twin primes gives P2(2) ≈ 1.18689. No relation to π, C2, or other known constants is apparent.
  3. Finiteness obstruction: As described above — whether the product identity ζ(s) = ∏g Pg(s) is compatible with a finite twin prime set is open.
  4. Generalization to ζ(s): The decomposition holds for all Re(s) > 1. At s = 10, P1(s) = 210/(210−1) accounts for approximately 96% of log ζ(10).

What This Does Not Claim

The gap-class factorization is a rearrangement of Euler's product, valid by absolute convergence. It is not a new theorem and proves nothing about the distribution of primes. The finiteness question is a structural observation — open, and not a proof of the twin prime conjecture.

Performance & Browser Limits

Computation Parameters

Note: Values > 100M may take several minutes
Browser limit: ~300M (use Python script for 400M-1B+)
Progressive Convergence to ζ(2) = π²/6
The cumulative product P_1 × P_2 × P_4 × ⋯ as gap classes are added in order of increasing gap size. Each step multiplies in all primes whose next-prime gap equals that gap value. The product must converge to π²/6 ≈ 1.64493 — this follows from absolute convergence of the Euler product, which allows arbitrary rearrangement. The chart shows the approach: gap 1 jumps immediately to 4/3 ≈ 1.333, then gap 2 (twin primes) brings it close to the target, and subsequent gaps add progressively smaller corrections. How fast it converges depends on how many primes each gap class contains.
Progressive Convergence Data
Individual Gap Family Products Pg
Each bar shows P_g = ∏_{p : gap(p)=g} p²/(p²−1) — the partial Euler product over all primes whose forward gap to the next prime equals g. Because the Euler product converges absolutely, the full identity ζ(2) = π²/6 = ∏_g P_g holds exactly in the limit. P_g measures the total "weight" that gap class g contributes multiplicatively. Gap 1 gives the single factor 4/3 (from p=2 alone, since gap(2)=1). All other realized gaps are even. A taller bar means that gap family carries more of the product — equivalently, more of log ζ(2) in the additive view. Click any bar or table row for the modal breakdown.
Gap Family Product Values (Click row for details)
Prime Distribution by Gap Class
How many primes belong to each forward-gap class up to the current prime limit. Gap 1 has exactly one prime (p=2). Gap 2 counts twin primes (p and p+2 both prime). Gap 4 counts cousin primes; gap 6 sexy primes. Beyond gap 6, counts fall off but do not obviously go to zero — the Twin Prime Conjecture asserts gap 2 never runs dry, and Polignac's conjecture (1849) asserts every even gap occurs infinitely often. Large gaps appear rarely but are guaranteed to grow: by Bertrand's postulate there is always a prime between n and 2n, bounding gap sizes; Cramér's model predicts the maximal gap near x is approximately (log x)².
Prime Count and Distribution (Click row for details)
Gap Ratio Analysis: Hardy-Littlewood Conjecture B
Tracks Count(gap=2)/Count(gap=4) and other ratios between prime gap class populations. The Hardy-Littlewood Conjecture B (1923) predicts that for any even gap g, the number of prime pairs (p, p+g) up to x is asymptotically C_g · li₂(x), where C_g is a product over primes involving (p−1)/(p−2) correction factors. The ratio Count(gap=2)/Count(gap=4) should therefore converge to C₂/C₄ = (∏_{p>2} (p−1)/(p−2)) / (∏_{p>2, p∤4} …) — a specific constant. If this ratio stabilises, it supports Conjecture B; if it drifts, it would suggest different asymptotic densities than predicted. The chart lets you test any pair of gap classes against each other.
Gap Ratio Data
Custom Gap Family Comparison
Compare specific gap families. Test hypotheses such as "gaps divisible by 6 have more primes" or "gap 6n > gap 6n±k for all k". Select up to 10 gaps to visualize side-by-side.

Select Gaps to Compare

Enter any even numbers separated by commas. Example: 6, 12, 18, 24, 30
Comparison Statistics
Percentage Contribution to ζ(2) by Gap Family
Shows each gap family's contribution as a percentage of log(ζ(2)). This reveals which gap sizes are most important for building up the final value. Typically gap 1 and gap 2 (twin primes) dominate.
Contribution Percentages (Click row for details)
Convergence Error Analysis
Tracks both absolute and relative error between the cumulative product and the target π²/6. As more gap families are included, the error decreases exponentially, showing convergence.
Error Metrics by Gap
Log-Scale Product Growth Pg
Displays log(P_g) for each gap family, making it easier to compare contributions across many orders of magnitude. Since products become multiplicative in log space, this shows additive contributions to log(ζ(2)).
Logarithmic Product Analysis
Step-by-Step Gap Accumulation: ζ(2) = P0 × P2 × P4 × ...
Exact numerical values of the cumulative product at each gap step: each row shows what the product equals after including all primes with gap ≤ g. The final row should match π²/6 to the number of decimal places the computation can resolve (limited by how many primes were sieved — larger limits give more decimal places). Comparing the Running Product column to π²/6 = 1.6449340668482… shows how many correct digits the current prime limit achieves.
Progressive Product Construction
Decimal Place Convergence Analysis: Weight Decay & Marginal Contribution
Understanding Weight Decay: As primes get larger, the factor p²/(p²-1) approaches 1.0, so later primes contribute less. For example, prime 2 contributes 4/3 = 1.333... (fixed), but prime 1,000,003 contributes ≈1.000000000004. This analysis shows which primes "lock in" each decimal place of convergence for each gap family.
Per-Prime Marginal Contribution
Riemann Zeros & Farey Structure

The non-trivial zeros ρ = ½ + itⁿ of ζ(s) govern oscillations in the prime-counting function and, through the Franel–Landau theorem, in the Farey discrepancy. This section has three linked views — all controlled by the same Mod N and Zeros inputs above.

● Circle canvas — Blue dots: gcd(r,m)=1 Farey points at angle 2πr/m on ring m. The purple dashed line is the critical axis Re(s)=½. Pink ticks on that axis mark each zero height tⁿ at radial depth r = tⁿ/N·rmax — so tⁿ = N sits exactly on the outer ring. As you increase Mod N, earlier zeros sink inward and new ones appear. This is a radial depth encoding, not a phase encoding.

● DFT Spectrum — Discrete Fourier Transform of the gcd=1 angular density at mod N. The horizontal axis is DFT frequency k; gold dashed lines mark k = tⁿ/(2π) for each zero. The empirical observation is that spectrum weight concentrates near these frequencies as N grows — a consequence of the explicit formula, which writes the prime-counting error as a sum over zeros each contributing oscillation at rate tⁿ.

● Discrepancy vs RH bound — Purple curve: actual Farey discrepancy DN = maxx|#{r/m ∈ FN : r/m ≤ x}/|FN| − x|, computed for N = 2…Mod N. Gold dashed: the RH asymptotic envelope log(N)/(2π√N). Grey dashed: trivial bound 3/(N+2). Under RH, DN is eventually O(N−½ log N) — the gold line is that leading term. Pink vertical lines mark N = ⌊tⁿ⌋; the discrepancy visibly oscillates near these heights. The main canvas ζ button shows a different but related view: phase points tⁿ·log(N) mod 2π on the outer ring, where the angular clustering of those phases encodes the Franel sum discrepancy direction.

GCD=1 Farey points (mod N) · Purple = critical axis Re(s)=½ · Pink = zero heights tⁿ  ·  Click to rotate · or use Inspect
▸ Farey Angular DFT Spectrum
Fourier spectrum of the GCD=1 angular distribution at mod N. Gold lines mark k = tⁿ/2π for each zero — an empirical observation that spectrum weight concentrates near these frequencies as N grows, loosely related to the explicit formula. This is not a theorem about Farey angular distributions. Hover bars to read magnitude.
▸ Farey Discrepancy vs Riemann Hypothesis Bound
Purple = actual Farey discrepancy DN = maxx|#{r/m ∈ FN : r/m ≤ x}/|FN| − x|. Gold dashed = log N/(2π√N), the leading term of the asymptotic bound that RH implies: DN = O(N−½ log N). RH implies DN eventually lies below this envelope — violations at small N are expected and carry no implication. Pink lines mark zero heights tⁿ. Hover to read values.
Known Non-Trivial Zero Heights tⁿ of ζ(s) — up to 100 terms
↑ Back to Farey Canvas

Composite Screenshot Export

Generate a comprehensive image combining selected charts with analysis summary and mathematical narrative

Global Export Settings

These settings apply to ALL chart exports (individual and composite)

Applies to all chart PNG exports (individual and composite screenshots)
Progressive Convergence
Gap Products
Gap Distribution
Percentage Contributions
Error Analysis
Log-Scale Products
Gap Ratio Analysis
Decimal Convergence