Leonhard Euler established in 1734 that the Riemann zeta function at s=2 admits the following representation:
The Euler product expresses ζ(2) as an infinite product over all prime numbers, where each prime p contributes the multiplicative factor p²/(p²-1).
This framework introduces a partition of the Euler product based on prime gap classes. Define gap(p) as the forward difference pn+1 - pn for consecutive primes. The Euler product may then be reorganized as:
where each gap family product is:
Prime gaps partition into the following classes:
This computational framework enables investigation of the following questions:
The tool employs a Segmented Sieve of Eratosthenes for prime generation, computes exact products Pg for each gap class, tracks progressive convergence to π²/6, and provides high-precision numerical analysis with configurable decimal representation. Browser analysis is reliable up to approximately 300 million; for larger ranges use the companion Python script.
This tool runs entirely in your browser. There are two distinct memory stages to be aware of:
For 400M and above, use the companion Python script instead. Unlike the browser, Python processes primes incrementally without storing them — using constant ~50 MB RAM regardless of range. It outputs the same CSV format which can be loaded back here for visualization.
Quick configurations for common research scenarios
To use pre-computed prime lists — note the same ~300M browser limit applies to uploaded files
Hardy & Littlewood's Conjecture B (1923): for any even integer h ≥ 2, the count of primes p ≤ x where p+h is also prime satisfies:
C₂ is the twin prime constant — an infinite Euler product over all primes p ≥ 3, measuring how residue-class constraints reduce the density of twin primes relative to a random model:
Each factor p(p−2)/(p−1)² < 1 accounts for the fact that for a prime p, there is one forbidden residue class mod p for each element of a twin-prime pair. The infinite product converges slowly to ≈ 0.66016. Below: partial products through the first 20 primes.
| Prime p | p(p−2)/(p−1)² | Factor value | Running C₂ product | % of final C₂ |
|---|
For each gap h, we compute S(h) = 2C₂ · ∏(odd prime p | h) (p−1)/(p−2). The table below shows the factorisation of h, which odd primes divide it, each correction factor, and the final S(h). Only odd prime factors count — p=2 always divides even h but contributes no correction because 2 is already handled in the baseline C₂ Euler product.
| Gap h | h = 2^a × odd | Odd prime factors | Correction factors (p−1)/(p−2) | Product | S(h) = 2C₂ × product | S(h)/S(2) | Name |
|---|
The integral li₂(x)=∫dt/ln²(t) has an asymptotic expansion. Each correction term below reduces prediction error. Change x to see how the terms' magnitudes shift with your analysis range.
| Terms used | Formula | li₂(x) value | 2C₂·li₂ prediction | Gain from prev term | Error vs obs twins* |
|---|
Every gap family in your analysis: S(h) derived step-by-step, li₂ prediction computed, compared against your observed count. The obs/pred ratio converges to 1.0 as x→∞.
| Gap h | Name | Odd prime factors of h | S(h) | S(h)/S(2) | Predicted | Observed | Obs/Pred | Error % | Convergence |
|---|---|---|---|---|---|---|---|---|---|
| Run the prime analysis above to populate this table | |||||||||
Select any gap to see every single arithmetic step: prime factorisation of h, identifying correction primes, computing each (p−1)/(p−2) factor, building S(h), expanding li₂(x) term by term, and arriving at the final prediction.
As x→∞, Count(gap=a)/Count(gap=b) → S(a)/S(b). This table shows current ratios from your data vs the theoretical limits, with a convergence bar showing how close you are.
| Ratio | Why this limit | Theoretical limit | Current value | % of limit reached | Visual |
|---|---|---|---|---|---|
| Run analysis above to populate | |||||
Generate a comprehensive image combining selected charts with analysis summary and mathematical narrative
These settings apply to ALL chart exports (individual and composite)
The gap-class decomposition above reorganises the Euler product ζ(2) = ∏ p²/(p²−1) by prime gap families. The Mertens function below probes the same prime landscape from a different angle: the Möbius function μ(n) encodes the exact prime-factorisation structure that drives those products, with μ(n) = ±1 for square-free n and 0 otherwise.
Their deep link is the Riemann Hypothesis. The RH is equivalent to both:
Both functions are ultimately measuring whether primes are distributed "fairly" — without systematic bias toward any particular factorisation pattern. The tight convergence in the gap products above and M(n) staying within ±√n below are two faces of the same conjecture.
| n | μ(n) | M(n) | ΔM | Square-Free | Prime Factors | |M(n)| | Within ±√n | Status |
|---|---|---|---|---|---|---|---|---|
| Σμ(n) = — | Final: — | Sq-Free: — | Avg |M|: — | Within bound: — | Zeros: — | |||
Wessen Getachew
Independent Mathematical Researcher
Twitter: @7dview
This analysis builds on Leonhard Euler's 1734 proof that ζ(2) = π²/6 and introduces a novel gap-class decomposition of the Euler product. The framework partitions primes by their forward differences, revealing that twin primes contribute approximately 34.79% to the logarithmic product log(ζ(2)), with contribution decay following precise combinatorial patterns.
This tool is provided for educational and research purposes. If you use this tool or its findings in academic work, presentations, or publications, please provide appropriate attribution to Wessen Getachew and cite the gap-class decomposition framework.