Prime gap Created 2026-10-20 Updated 2026-11-05
The prime gap is the difference between consecutive prime numbers. For the primes , the first gaps are . Every gap after the first is even because both endpoint primes are odd.
Prime gaps are unbounded: for any , the consecutive integers are all composite, since each is divisible by its corresponding summand. Thus there are arbitrarily long prime-free intervals. This elementary argument proves existence without determining how large gaps typically are near a specified bound.
Prime index Created 2026-10-20 Updated 2026-11-05
The prime index of a prime number is its position in the increasing sequence . Thus the index of is , and the prime-counting function satisfies .
Indexing begins at one here. An implementation using zero-based array positions must subtract one. The index describes ordering among primes, whereas a prime gap measures the numerical distance between neighboring primes. For nonprime , still counts primes up to , but itself has no prime index.