A high-performance tool to verify a pattern in the distribution of prime numbers at massive scales. This implementation efficiently tests the "360 conjecture" about prime number locations across ranges reaching into the hundreds of millions and beyond.
This tool tests the following conjecture about prime numbers:
Every prime number P can be located within a distance of at most 180 units from at least one of these candidates:
- The factors of m×360, where m is the segment scale factor
- Terms in a recursive sequence starting at (m-1)×360+181
For any integer m≥1, the pattern holds for all primes in the range ((m-1)×360, m×360].
Our computational experiments have verified the pattern for scales ranging from 1 up to 100,000,010, which corresponds to numbers around 36 billion. For each scale tested, all prime numbers in the corresponding range were successfully located by one of the two methods with a maximum offset of 180.
Scale (m) | Range End | Primes | Success Rate | Max Distance |
---|---|---|---|---|
1 | 360 | 72 | 100% | 180 |
10 | 3,600 | 489 | 100% | 180 |
100 | 36,000 | 3,512 | 100% | 180 |
1,000 | 360,000 | 30,396 | 100% | 180 |
10,000 | 3,600,000 | 278,569 | 100% | 180 |
100,000 | 36,000,000 | 2,433,654 | 100% | 180 |
100,000,000 | 36,000,000,000 | Sample* | 100% | 180 |
*For very large scales, a sampling approach was used to test representatively
The first part of this pattern, looking only at the first segment (scale m=1), reveals a striking property: taking the factors of 360 and examining prime numbers within a distance of ±1 of these factors identifies the primes in their natural order up to the 13th prime. This observation was the initial insight that led to the development of the full pattern.
The factors of 360 are: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360.
- Massive Scale Testing: Verifies the pattern for scales far beyond previous implementations
- Parallel Processing: Utilizes Rayon for multi-threaded prime checking and verification
- Arbitrary Precision: Uses BigUint for handling extremely large numbers
- Progress Tracking: Reports progress during long-running checks
- Memory Efficient: Optimized to avoid excessive memory usage at large scales
- Sampling Mode: For extremely large ranges, uses a representative sampling approach
cargo run --release [max_m] [min_m] [max_primes_per_range]
Parameters:
max_m
: The maximum scale factor to test (default: 10)min_m
: The minimum scale factor to test (default: 1)max_primes_per_range
: The maximum number of primes to check per range (default: 100,000)
Example for testing from scale 1 million to 1 million + 10:
cargo run --release 1000010 1000000 1000
- Memory vs. Scale: At extremely large scales (m > 10^9), memory usage for storing prime lists becomes significant
- Sampling Mode: Automatically activates for ranges with too many primes
- Primality Testing: Uses specialized algorithms for different number sizes
- Batch Processing: Divides large scale ranges into manageable batches
The code employs several optimization strategies:
-
Efficient Prime Generation:
- Uses primal's Sieve for ranges within u64::MAX
- Uses num_prime with parallel testing for larger ranges
- Implements sampling for extremely large ranges
-
Optimized Factor Generation:
- For numbers under u64::MAX, uses primal's efficient factorization
- For larger numbers, uses a targeted approach focusing on relevant factors only
- Avoids unnecessary computation of all factors for massive numbers
-
Memory Management:
- Limits prime list size for very large ranges
- Uses stream-like processing where appropriate
- Applies parallel processing with controlled batch sizes
-
Progress Reporting:
- Provides detailed progress updates for long-running operations
- Estimates completion time for large scale tests
The 360 Prime Pattern represents a novel and significant observation about the distribution of prime numbers. Our computational verification provides strong evidence that this pattern holds universally across all ranges tested.
The pattern demonstrates that primes are not as randomly distributed as they might appear. Instead, they can be systematically located within bounded distances from specific sets of candidate numbers derived from the factors of multiples of 360 and terms of a particular recursive sequence.
A comprehensive white paper on this pattern is available in the repository.
- Rust 1.54 or later
- At least 4GB RAM (16+GB recommended for scales beyond 10^8)
- Multi-core CPU (8+ cores recommended for optimal performance)