Calculator Inputs
Choose one search method. Hidden fields remain available for later modes.
Formula Used
A prime gap measures consecutive prime separation. The formula is gn = pn+1 − pn. Larger values mark wider prime-free intervals.
The normalized gap divides the gap by ln(pn). Cramér comparison uses [ln(pn)]². These measures compare gaps across changing number scales.
How to Use
Select a search mode and enter valid integers. Choose filters, precision, and a practical block size. Press calculate to inspect ranked prime gaps.
Use boundary primes for crossing interval edges. Record mode starts from two for global context. Export tables after reviewing every calculated value.
Example Data
| Range | Lower prime | Upper prime | Gap |
|---|---|---|---|
| 2 to 100 | 89 | 97 | 8 |
| 100 to 150 | 113 | 127 | 14 |
| 500 to 600 | 523 | 541 | 18 |
Prime Gap Notes
Every prime after two is odd. Therefore later consecutive prime gaps are even. Twin primes always create a gap of two.
Record gaps exceed all earlier observed gaps. They become rarer as the search grows. Efficient segmented sieves reduce memory during large searches.
Frequently Asked Questions
What is a prime gap?
It is the difference between consecutive prime numbers. No other prime lies between those endpoints. The calculator verifies this ordering automatically.
Why are most prime gaps even?
Every prime greater than two is odd. Subtracting two odd integers gives an even number. The first gap remains the only exception.
What is a record prime gap?
A record gap exceeds every earlier prime gap. Global records require scanning from the prime two. Range records only describe the selected interval.
What does normalized gap mean?
It divides the observed gap by a logarithmic estimate. This supports comparisons at different prime sizes. Larger normalized values indicate unusually wide spacing.
What is the Cramér benchmark?
It uses the square of the natural logarithm. Researchers compare large gaps with this scale. It is a comparison, not a proof.
Why include boundary primes?
A large gap may cross a selected boundary. Extra primes reveal those crossing intervals. Disable this option for strict internal pairs.
What block size should I choose?
Larger blocks may process faster but use memory. Smaller blocks reduce peak memory usage. The default balances both needs for common searches.
Can it verify two supplied primes?
Yes, manual mode checks both endpoints first. It then searches for primes between them. A valid result confirms consecutive prime status.
Why does the calculator limit ranges?
Large prime searches require substantial processing resources. Limits protect server memory and response times. Divide larger studies into several smaller ranges.