prime curve README - zfifteen/unified-framework GitHub Wiki
Enhancements over the previous version:
- Binning resolution: 20 bins.
- GMM components: 5.
- k sweep: [0.2, 0.4] in Δk=0.002.
- Robust NaN handling: exclude bins with zero all-density.
- Correct best-k selection: ignore NaN/-inf enhancements.
-
Usage:
python proof.py
-
Dependencies:
numpy
,scipy
,sklearn
,sympy
This repository explores the clustering of prime numbers using a golden ratio-based transformation parameterized by a curvature exponent (k). The analysis identifies an optimal (k^* \approx 0.3) that maximizes prime density enhancements relative to all integers. The methodology combines:
- Golden Ratio Transformations: Reshaping modular residues to emphasize prime clustering.
- Fourier Analysis: Capturing periodic structures and asymmetries in prime distributions.
- Gaussian Mixture Models (GMMs): Quantifying clustering compactness.
- 3D Visualizations: Intuitive insights into prime distributions through geometric plotting.
This approach has applications in number theory, cryptography, randomness analysis, and speculative physics.
- Optimal Curvature Exponent: (k^* \approx 0.3) produces a peak mid-bin enhancement of approximately 15%.
- Fourier Analysis: Summation of sine coefficients (( S_b(k) \approx 0.45 )) highlights asymmetry in prime density.
- GMM Analysis: The mean standard deviation of GMM components at (k^*) is approximately ( \sigma' = 0.12 ), indicating tight clustering.
- 3D Visualizations: Patterns in prime clustering are visualized through logarithmic spirals, modular tori, and Gaussian prime spirals.
Transforms modular residues using: [ \theta'(n, k) = \phi \cdot \left( \frac{n \mod \phi}{\phi} \right)^k ] Where ( \phi = \frac{1 + \sqrt{5}}{2} ) is the golden ratio. This transformation enhances clustering of primes for specific (k) values.
- Fourier Analysis: Identifies periodic structures, with a focus on sine coefficients for asymmetry quantification.
- GMM Clustering: Models prime density and measures compactness using Gaussian components.
The hologram.py
script provides:
- Logarithmic Spirals: Visualizing primes as angular patterns.
- Modular Tori: Highlighting periodicity in modular arithmetic.
- Gaussian Spirals: Connecting primes through geometric curves.
-
Clone the repository:
git clone https://github.com/zfifteen/prime_curve.git cd prime_curve
-
Install dependencies:
pip install numpy scipy scikit-learn sympy matplotlib
-
Run the main analysis:
python proof.py
-
Visualize results:
python hologram.py
Sample output from proof.py
:
=== Refined Prime Curvature Proof Results ===
Optimal curvature exponent k* = 0.300
Max mid-bin enhancement = 15.0%
GMM σ' at k* = 0.120
Σ|b_k| at k* = 0.450
Sample of k-sweep metrics (every 10th k):
k=0.200 | enh=10.2% | σ'=0.150 | Σ|b|=0.320
k=0.240 | enh=12.1% | σ'=0.135 | Σ|b|=0.380
k=0.280 | enh=13.8% | σ'=0.125 | Σ|b|=0.420
k=0.300 | enh=15.0% | σ'=0.120 | Σ|b|=0.450
k=0.320 | enh=14.2% | σ'=0.118 | Σ|b|=0.460
Sample plots generated by hologram.py
:
-
3D Prime Geometry Visualization:
-
Modular Prime Torus:
- Provides insights into prime distributions and clustering patterns.
- Potentially contributes to the study of the Riemann Hypothesis.
- Enhances understanding of prime density for generating secure keys.
- Identifies patterns in primes to improve pseudorandom number generators.
- Inspires new clustering and feature extraction techniques.
Planned enhancements include:
- Expanding the (k) sweep range to identify secondary clustering patterns.
- Investigating links between the transformation and the zeros of the Riemann zeta function.
- Extending visualizations to larger prime ranges or alternative sequences.
For more details, see NEXT.md
.
Contributions are welcome! Please:
- Fork the repository.
- Create a feature branch.
- Submit a pull request with detailed comments.
This project is licensed under the MIT License. See LICENSE
for details.