Students compare the distance between two highlighted tiles on a number-line model.

Prime Gap definition

A prime gap is the difference between two consecutive prime numbers.

In Spanish
brecha entre primos
Topic
Prime numbers and number theory

Prime Gap in a picture

Prime Gap diagramThe next prime after 23 is 29, so the prime gap is 6.Start at prime 23Look for the next prime in order24, 25, 26, 27, 28These five integers are compositeNext prime: 29The gap is 29 − 23 = 6
The next prime after 23 is 29, so the prime gap is 6.

How it works

If p is prime and q is the very next prime after it, the gap is q − p. The first gap, between 2 and 3, is 1. Every later prime gap is even because both primes are odd.

Worked examples

Find the gap between 13 and its next prime.

The next prime is 17, so the gap is 4.

Are 11 and 17 consecutive primes?

No. The prime 13 lies between them.

What gap identifies a pair of twin primes?

A gap of 2.

Common mistake

Subtract the two prime values. There is one fewer integer strictly between them than the size of the gap.

Quick check

What is the prime gap from 31 to 37?

How many integers lie strictly inside a prime gap of 6?

Show answer

5.

Why are prime gaps after the first gap even?

Show answer

The difference between two odd primes is even.

Sources

Flashcard

Prime Gap

Reveal the definition

A prime gap is the difference between two consecutive prime numbers.

Effortless Math. “Prime Gap.” Math Dictionary.