Skip to content

NachoPeinador/RIEMANN_Z6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

189 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 Riemann-Z6: The Arithmetic Crystal

Decoding Spectral Duality for Factorization and Mersenne Primes

Read in Spanish Python Numba Open in Colab Papers DOI ORCID X


🎯 TL;DR - The Essentials

πŸ”¬ Theoretical Findings

  • βš›οΈ Modular Coherence: Riemann zeros exhibit Z/6Z structure
  • πŸ“Š Saturated SNR: 12.69 Β± 0.01 (proven from L(2,Ο‡)=π²/9)
  • 🧩 Unifying Model: Riemann-GUE Ensemble (p_KS = 0.27 vs GUE)

⚑ Computational Applications

  • βš™οΈ Factorization: -33.33% search space (validated)
  • πŸ”’ Mersenne Primes: 100% in Channel 1 (analytical proof)
  • πŸ“ˆ Optimal Efficiency: Modulo 6 maximizes EF = 1.00

πŸ’‘ Key Concept

The spectrum operates as an "arithmetic crystal" where Z/6Z memory and GUE chaos achieve optimal information equilibrium.


πŸ” Research Overview: Resolving the Chaos-Order Duality

For decades, a fundamental tension has existed in the study of the Riemann zeta function: local universality of the Gaussian Unitary Ensemble (GUE) suggests spectral chaos, while the global rigidity imposed by the Sieve of Eratosthenes implies deterministic order.

This research project demonstrates that these are not contradictory aspects, but complementary ones. Through analytical derivation and extensive numerical validation ($N=10^5$ zeros), we show that the Riemann spectrum operates as a physical system with "arithmetic memory", whose long-range correlations are governed by the $\mathbb{Z}/6\mathbb{Z}$ modular structure. This finding is formalized in the Riemann-GUE Ensemble, a random matrix model that reconciles local chaos with global order.

πŸš€ From Theoretical Discovery to Computational Implications

The emerging modular coherence has tangible algorithmic consequences:

  • Factorization: Potential efficiency gains by leveraging the structural density of forbidden channels.
  • Mersenne Primes: Their observed collapse into a single modular channel (1 mod 6) reflects an extreme form of the underlying symmetry.

Computational Validation: Factorization and Mersenne
Figure 1. Empirical observations: Reduced search space in a modular sieve (Left) and distribution of known Mersenne primes (Right).

Central Theoretical Insight

The spectrum of Riemann zeros is not asymptotically random. It exhibits modular phase coherence at arithmetic frequencies ($\alpha = \ln p$), where Modulo 6 acts as an optimal low-noise channel for transmitting arithmetic information, quantified by the saturated Signal-to-Noise Ratio (SNR).

The Arithmetic Crystal Paradigm

The Riemann zeros do not oscillate in a random void. They behave like excitations in a modular lattice where Modulo 6 acts as a Noise-Free Waveguide, allowing perfect transmission of arithmetic information through local quantum chaos.


🧭 Study's Conceptual Framework

1. Discovery Flow: From Paradox to Applications

graph TD
    P["Fundamental Paradox<br>Local Chaos (GUE) vs Global Arithmetic Order"] --> FE["Explicit Formula<br>Riemann-von Mangoldt"]
    FE --> ID["Quadratic Identity<br>L(2,χ₀⁽⁢⁾) = (Ο€/3)Β² β‰ˆ 1.0966"]
    ID --> SNR["SNR Saturation<br>12.69 Β± 0.01 (empirical value)"]
    SNR --> RGUE["Riemann-GUE Ensemble<br>Validated unifying model (p_KS = 0.27)"]
    RGUE --> TH["Informative Thermodynamics<br>Module 6: EF = 1.00 (optimal)"]
    RGUE --> APP1["Application 1: Factorization<br>-33.33% search space"]
    RGUE --> APP2["Application 2: Mersenne Primes<br>100% in Channel 1 (1 mod 6)"]

    style P fill:#f9f,stroke:#333,stroke-width:2px
    style ID fill:#9f9,stroke:#333,stroke-width:2px
    style SNR fill:#ff9,stroke:#333,stroke-width:2px
    style RGUE fill:#bbf,stroke:#333,stroke-width:3px
Loading

2. Interdisciplinary Unification: The Riemann-GUE Nexus

Spectral-Arithmetic Unification - Riemann-GUE Ensemble as an interdisciplinary nexus
Figure 2. The Riemann-GUE Ensemble (or its Hamiltonian realization HΜ‚_RGUE) acts as an interpolating object reconciling arithmetic rigidity with chaos universality, through the Z/6Z symmetry breaking mechanism, fixed by the anomaly L(2,χ₀⁽⁢⁾) = (Ο€/3)Β² (Adapted from Fig. X of the paper).

Explanation of Connections:

Connection Mechanism Key Result
Number Theory β†’ RGUE Explicit Formulas + $(\pi/3)^2$ Identity Analytical connection zeros↔primes
Random Matrices β†’ RGUE Structured Perturbation + $U(N) \to \mathbb{Z}/6\mathbb{Z}$ Breaking Preservation of local universality
RGUE → Quantum Chaos SNR Saturation → Fixed point $g^*$ Diffusive→saturated transition
Langlands Program β†’ RGUE Conductor↔module correspondence + Optimality $m_\chi$ Generalization to other $L$-functions

3. The Parsimony Hierarchy: Levels of Structure

graph LR
    L1["Level 1: GLOBAL<br>Weyl's Law<br>dΜ„(E) ∼ (1/2Ο€) ln E<br><em>(Fixed Input)</em>"] --> L2
    L2["Level 2: LOCAL<br>Universality<br>p(s) ∼ s² (GUE)<br><em>(Fixed Input)</em>"] --> L3
    L3["<strong>Level 3: MESO<br>Informational Parsimony</strong><br>L(2,χ₀⁽⁢⁾) = (Ο€/3)Β²<br><em>(Emergent Structure)</em>"] --> L4
    L4["Level 4: OUTPUT<br>Observed Coherence<br>SNR(N) β†’ 12.69"]
    
    style L1 fill:#e1f5fe,stroke:#01579b
    style L2 fill:#f3e5f5,stroke:#4a148c
    style L3 fill:#e8f5e8,stroke:#1b5e20,stroke-width:3px
    style L4 fill:#fff3e0,stroke:#e65100
Loading

Interpretation: The $\mathbb{Z}/6\mathbb{Z}$ modular structure (Level 3) emerges as the optimal organizer that maximizes recoverable arithmetic information, acting upon the fluctuations allowed by local GUE universality (Level 2) within the global framework of Weyl's law (Level 1), generating the observed coherence (Level 4).


πŸ”‘ Key Points of the Conceptual Framework

  1. It is not tautological: The Riemann-GUE Ensemble does not arbitrarily inject $\mathbb{Z}/6\mathbb{Z}$; this emerges as a thermodynamic fixed point of the parameter space.
  2. Duality preserved: The model maintains local GUE statistics ($p_{\text{KS}} = 0.27$) while introducing long-range modular correlations.
  3. Generalizable: The framework suggests a broader correspondence (analogous to Langlands) between character conductors and optimal spectral coherence modules.
  4. Physically interpretable: The SNR saturation acts as an "informative Chandrasekhar limit" where arithmetic signal and spectral noise reach equilibrium.

Conceptual Conclusion: The Riemann spectrum does not randomly choose between chaos and order; it crystallizes at the optimal point where arithmetic memory (Z/6Z) and spectral entropy (GUE) jointly maximize informational efficiency.


πŸ“Š Experimental Validation ($N=10^5$ Zeros)

The Smoking Gun: Unlike the standard diffusive prediction (GUE), the spectral Signal-to-Noise Ratio saturates rapidly.

SNR Saturation vs GUE Prediction
Figure 3. Evidence of Universality Breakdown. Left: SNR dynamics (gray dots) deviate from the GUE model (dashed red line) and fit the saturation model (magenta line). Right: Energy massively concentrates in prime channels 1 and 5.

Statistical Significance SNR Saturation Algorithm Speedup Mersenne Symmetry License

Domain Metric Result Paper Reference Implication / Nature of Evidence
Statistical Uniformity Test (KS) for phases at $x=7$ $p \sim 10^{-75}$ Table 1 (Section 4.1) Extreme rejection of the null hypothesis of uniform phase (local GUE behavior is preserved).
Spectral Saturated SNR Value 12.69 $\pm$ 0.01 Figure 3 (Section 5.2) Empirical saturation value; analytically proven to stem from $L(2,\chi_0^{(6)}) = \pi^2/9$ (Theorem 7.1 and Appendix F).
Structural Mersenne Primes ($M_p, p&gt;2$) 100% in Channel 1 Theorem A.2 (Appendix A.2) Observational fact for all known Mersenne primes; direct analytical proof $M_p \equiv 1 \pmod{6}$.
Model Riemann-GUE vs. GUE (local spacing) $p_{KS} = 0.27$ Result 6.1 (Section 6.3) Failed to reject the null hypothesis; model preserves local GUE universality.
Thermodynamic Filter Optimal Efficiency Maximum at modulo 6
(EF = 1.00 vs 0.125)
Result C.1 (Appendix C)
Figure G.1 (Appendix G)
Module 6 maximizes the marginal relative gain (EF) between successive modular filters.

🧩 Core Innovations

1. The Quadratic Coherence Identity and SNR Saturation

The mathematical core of the saturation phenomenon is established by an exact identity:

$$ L(2,\chi_0^{(6)}) = \left[ L(1,\chi_{12}) \right]^2 = \frac{\pi^2}{9}. $$

Analytical Derivation: In the attached paper, we analytically derive how this identity, combined with the complete multiplicative structure of integers (via the explicit formula), leads to the empirical saturated value $\mathrm{SNR_{sat}} \approx 12.69$ (see Appendix F of the paper). This bridges the gap between pure number theory and observed spectral statistics.


2. Modular Factorization Reactor

A paradigm shift in sieving algorithms. Instead of searching "blindly" among odd numbers, the algorithm exploits $\mathbb{Z}/6\mathbb{Z}$ resonance to "tunnel" through numerical noise.

+ Classic Search Space (Odds): [1, 3, 5, 7, 9, 11...]
- Detected Noise (Forbidden Channels): [ 3, 9, ...]
= Riemann Z/6Z Search Space: [1, 5, 7, 11...]

Result: A physical reduction of the search space by 33.3335% (experimentally validated), matching the theoretical prediction of spectral density.

3. Mersenne Primes and Modular Rigidity

A striking demonstration of how arithmetic structure dictates global distribution. While ordinary primes asymptotically approach an equitable split between channels 1 and 5 modulo 6 (with a known bias, the Chebyshev bias, favoring channel 5 in observed ranges), Mersenne Primes ($M_p = 2^p-1$ for $p&gt;2$) exhibit absolute modular rigidity.

Prime Type Channel 1 (1 mod 6) Channel 5 (5 mod 6) Observed Behavior
Ordinary Primes ~50% (slight deficit) ~50% (slight excess) Near symmetry with Chebyshev bias
Mersenne Primes ($p&gt;2$) 100% 0% Complete Polarization

This is not a statistical fluke, but a demonstrable arithmetic fact: For any odd prime $p$, $2^p \equiv 2 \pmod{6}$, therefore $M_p = 2^p - 1 \equiv 1 \pmod{6}$. This forces all Mersenne primes (greater than 3) to fall into channel 1.

Implication: The $\mathbb{Z}/6\mathbb{Z}$ structure acts as a filter. For generic primes, it creates a slight imbalance. For numbers with specific arithmetic forms (like Mersenne numbers), it can enforce a total collapse into a single modular state, illustrating the deterministic power of modular arithmetic over sequences of importance in number theory.

Conclusion: The $\mathbb{Z}/6\mathbb{Z}$ structure is not an asymptotic statistic; it is a geometric lattice that forces the largest mathematical objects to collapse into a single quantum state (Channel 1).


πŸš€ Reproducibility and Benchmarking

This project prioritizes reproducible science. To ensure the performance comparison (-33%) is fair, the code uses numba to compile both algorithms (Classic and Riemann) to machine code (JIT), eliminating the Python interpreter overhead.

Option A: Cloud Execution (Recommended)

The fastest way to validate results without setting up a local environment. Includes SNR validation and factorization demonstration.

Open In Colab

Click to open and run the notebook in Google Colab. Your changes will not be saved to this repository.

Option B: Local Installation (For Audit)

πŸ‘‡ Clic para ver instrucciones de InstalaciΓ³n Local y AuditorΓ­a

If you wish to inspect the code or run it on your own hardware to validate CPU times:

1. Clone the Repository

git clone https://github.com/NachoPeinador/RIEMANN_Z6.git
cd RIEMANN_Z6

2. Install Dependencies It is recommended to use a virtual environment (venv or conda).

pip install numpy matplotlib scipy numba jupyter

3. Critical Versions JIT benchmarking is sensitive to versions. Validated on:

python      >= 3.8
numpy       >= 1.21
numba       >= 0.55  # CRITICAL: Earlier versions may fail on @njit(fastmath=True)
matplotlib  >= 3.5

4. Run the Suite

jupyter notebook Notebooks/Spectral_Arithmetic_Duality.ipynb

Hardware Note: While absolute factorization times will vary according to your CPU (Intel/AMD/Apple Silicon), the operation reduction ratio (~33.33%) is a mathematical invariant and should remain constant on any architecture.


🎯 Contribution and Perspectives

This work provides a theoretical framework and empirical evidence for modular coherence in the zeros of the Riemann zeta function. By introducing the Riemann-GUE Ensemble, it offers a concrete model where local random matrix statistics coexist with global arithmetic structure.

Future directions include extending the analysis to higher zeros, exploring other $L$-functions, and further investigating the algorithmic implications of modular coherence for problems in computational number theory.

Conclusion: We do not refute quantum randomness; we demonstrate that it operates on an indestructible arithmetic substrate (the Modulo 6).


βš–οΈ Dual Licensing Model

πŸ‘‡ Click to view Licence details

This project adopts a hybrid approach to democratize scientific discovery while protecting the intellectual property of optimization algorithms.

πŸ”¬ 1. Research and Open Science (Free)

License

Designed to foster academic collaboration without risk of commercial exploitation.

  • βœ… Allowed: Experiment replication, educational use, personal forks, code audit.
  • ❌ Prohibited: Use in commercial products, paid services, or integration into proprietary hardware.

πŸ’Ό 2. Commercial and Industrial Use (Restricted)

Commercial

Any implementation of the $\mathbb{Z}/6\mathbb{Z}$ sieving architecture or its derivatives for profit-making purposes (e.g., cryptanalysis, hardware acceleration, industrial optimization) requires an explicit licensing agreement.

[!IMPORTANT] Legal Notice: The 33% reduction in computational costs constitutes an industrial competitive advantage. To consult terms of use or request a commercial exemption, review the COPYRIGHT.md file.


πŸ“ Citation

πŸ‘‡ Click to view Citation details

If you use the Riemann-Z6 architecture, the Factorization Reactor, or the findings on Mersenne in your research, please cite the original work:

BibTeX (LaTeX):

@misc{peinador2026riemann,
  author = {Peinador Sala, JosΓ© Ignacio},
  title = {Spectral-Arithmetic Duality: Modular Phase Coherence in the Riemann Spectrum},
  year = {2026},
  publisher = {Zenodo},
  version = {v1},
  doi = {10.5281/zenodo.18485154},
  url = {https://github.com/NachoPeinador/RIEMANN_Z6}
}

APA:

Peinador Sala, J. I. (2026). Spectral-Arithmetic Duality: Modular Phase Coherence in the Riemann Spectrum. GitHub/Zenodo. DOI

To cite the factorization algorithm:

The modular Z/6Z sieving algorithm reduces the search space by 33.33% (Peinador, 2025, Section 8.1).

To cite the Mersenne results:

Mersenne primes exhibit complete modular polarization in channel 1 (Peinador, 2025, Theorem A.2).


πŸ“ Repository Structure

This repository is organized to ensure total scientific reproducibility.

πŸ‘‡ Click to view repository structure
.
β”œβ”€β”€ πŸ“‚ Papers/                          # Academic & Theoretical Documentation
β”‚   β”œβ”€β”€ πŸ“„ Spectral-Arithmetic_Duality.pdf       # ⭐️ The Paper (Final Reviewed Version)
β”‚   └── πŸ“ Spectral-Arithmetic_Duality.tex       # LaTeX source code (Compilable)
β”‚
β”œβ”€β”€ πŸ“‚ Notebooks/                                         # Computational Lab (Python + Numba)
β”‚   β”œβ”€β”€ πŸ““ Spectral_Arithmetic_Duality.ipynb              # πŸ”¬ The Research "Core" (7 Phases):
β”‚   β”‚   β”œβ”€β”€ 1. Statistical Anomaly (KS Tests with p ~ 10⁻⁷⁡)
β”‚   β”‚   β”œβ”€β”€ 2. SNR Dynamics (Exact saturation at 12.69)
β”‚   β”‚   β”œβ”€β”€ 3. Riemann-GUE Model (Monte Carlo Validation)
β”‚   β”‚   β”œβ”€β”€ 4. Analytical Verification (L(2) = π²/9 Identity)
β”‚   β”‚   β”œβ”€β”€ 5. Thermodynamics (Optimal ROI calculation 0.105)
β”‚   β”‚   β”œβ”€β”€ 6. Factorization Reactor (Benchmark: -33% ops)
β”‚   β”‚   └── 7. Mersenne Radar (Symmetry Breaking)
β”‚   β”‚
β”‚   └── πŸ’Ύ zetazeros.txt                # Dataset (LMFDB - First 100k zeros)
β”‚
β”œβ”€β”€ πŸ“‚ Images/                          # High-Resolution Visualizations
β”‚   β”œβ”€β”€ πŸ“Š snr_saturation.png
β”‚   └── πŸ“‰ mersenne_symmetry.png
β”‚
β”œβ”€β”€ πŸ“œ LICENSE                          # Dual Licensing Model
└── βš™οΈ requirements.txt                 # Dependencies (numpy, matplotlib, numba...)


Last Update: December 2025 | Status: Research Complete | Made with βš›οΈ & 🐍

About

Computational validation of the modular Z/6Z structure in Riemann zeros. Includes the Reconstruction Theorem, logarithmic spectroscopy (12.69x SNR), and Python code to replicate phase resonance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors