This project introduces a high-performance framework that accelerates the generation of large prime numbers by leveraging the spectral structure of Riemann zeta zeros. It outperforms traditional methods, achieving 1024-bit primes in approximately 37 ms with 100% accuracy, all in pure Python.
The ultrafast-spectral-primes repository presents a groundbreaking computational framework for the ultra-fast generation of large prime numbers by exploring the spectral structure of Riemann zeta function zeros. This innovative approach reframes prime detection as a signal processing challenge, significantly enhancing performance metrics compared to traditional methods.
Executive Summary
This high-performance research prototype achieves remarkable results:
- Generation of 1024-bit primes in approximately 37 milliseconds (with a median of 27.6 ms).
- 100% accuracy, verified across over 2,000 rigorous tests with zero false positives.
- Developed entirely in Python, demonstrating competitive performance compared to optimized C implementations such as OpenSSL.
Performance Benchmarks
The outcomes from testing on a standard MacBook Pro (i7 @ 2.8 GHz) operating in a single-threaded Python environment are summarized in the following table:
| Key Size | Digits | Spectral Law (Mean) | Spectral Law (Median) | Accuracy | Status |
|---|---|---|---|---|---|
| 512-bit | 154 | 8.10 ms | 5.60 ms | 100% | Proto |
| 1024-bit | 309 | 37.43 ms | 27.60 ms | 100.0% | Proto |
| 2048-bit | 617 | 284.12 ms | 271.11 ms | 100% | Proto |
| 4096-bit | 1234 | 2.06 sec | 1.43 sec | 100% | Proto |
Why This is a Breakthrough
- Enhanced Performance: This method outperforms traditional C implementations, where generating 1024-bit primes typically ranges between 50-100 ms, effectively halving the expected time with Python alone.
- Spectral Advantage: Unlike conventional approaches that lack direction, the Spectral Law efficiently identifies high-density prime regions, reducing the search space markedly.
- Consistency in Results: A striking 95% of 1024-bit primes are produced within just 104.41 ms, showcasing the method's robustness with minimal variability.
Theoretical Foundation
The framework supports the Hilbert-Pólya conjecture, treating non-trivial zeros of the Riemann zeta function as eigenvalues of a self-adjoint operator. Key components include:
- Riemann Resonance Operator: An operator-driven spectral framework is constructed to achieve high precision alignment between eigenvalues and Riemann zeros.
- Dynamic Scaling Laws: The discovered scaling laws allow for the generation of "virtual zeros" across various ranges with an impressive correlation coefficient of $R^2 = 0.99999$.
Three-Step Pipeline
- Zero Generation: The Spectral Law quickly generates high-index zeros using specific range-dependent coefficients.
- Explicit Formula Application: Utilizing Riemann's explicit formula enables the computation of the Chebyshev function $$ with resultant prime numbers emerging as characteristic fluctuations.
- Resonance Detection: An adaptive algorithm identifies prime candidates from discrete resonance peaks without prior knowledge of prime locations.
Independent Verification
The approach has been independently validated with true Riemann zeros using mpmath.zetazero(), leading to outstanding precision metrics:
| $x_{max}$ | Recall | Precision | F1-Score |
|---|---|---|---|
| 1,000 | 100.0% | 100.0% | 1.000 |
| 10,000 | 99.9% | 100.0% | 0.9996 |
Environment
- Language: Python 3.8+
- Libraries: Built on essential libraries such as
numpy,scipy, andmpmath. - Portability: Designed for straightforward adaptation to C or Rust for enhanced performance.
For comprehensive details and experimental validations, refer to the full theoretical framework and documents:
- 📄 A Spectral Method for Ultra-Fast Generation of Large Prime Numbers
- 📄 [Empirical Validation of the Prime Nodal Condition and the Spectral Law for the Riemann Hypothesis](https://zenodo.
No comments yet.
Sign in to be the first to comment.