Skip to content

What Are Twin Primes

    Twin primes are two prime numbers that differ by 2. Examples include 3 and 5, 5 and 7, and 11 and 13.

    They are connected to a famous open question in number theory: do twin prime pairs continue forever? As of July 31, 2026, no proof has settled that question.

    A colorful infographic explaining what twin primes are and their unique number pattern.

    What twin primes are

    A prime number has exactly two positive divisors: 1 and itself. A twin prime pair forms when both numbers are prime and the distance between them is exactly 2.

    That definition means a pair is not made of twin primes just because the numbers are close. Both values must pass the prime test, and the gap must be 2. So 11 and 13 work, but 23 and 25 do not, because 25 is not prime.

    Definition note: Twin primes are also a special case of a prime gap. Their gap is the smallest possible gap between odd primes.

    Small examples

    The first few pairs are easy to spot:

    Twin prime examples and what they show
    PairGapWhy it counts
    3 and 52Both are prime, and the gap is exactly 2.
    5 and 72Another valid pair; 5 is part of two twin prime pairs.
    11 and 132A standard example beyond single-digit primes.
    17 and 192Shows the same pattern among larger primes.
    29 and 312A twin prime pair in the next range.

    Why the gap is special

    Except for 2, every prime number is odd. When two odd numbers differ by 2, there is only one whole number between them, and that middle number is even. Any even number greater than 2 is composite. That is why twin primes sit as close together as odd primes can sit.

    This also explains another detail: every twin prime pair consists of consecutive primes. There cannot be another prime in the middle, because the middle value is even and greater than 2.

    Common misunderstanding: Not every close pair of numbers is a twin prime pair. Both numbers must be prime. A gap of 2 alone is not enough.

    The 6n − 1 and 6n + 1 pattern

    Every integer can be written in one of these forms:

    • 6n
    • 6n + 1
    • 6n + 2
    • 6n + 3
    • 6n + 4
    • 6n + 5

    For primes greater than 3, most of those forms fail immediately:

    • 6n, 6n + 2, and 6n + 4 are even.
    • 6n + 3 is divisible by 3.

    That leaves 6n + 1 and 6n + 5, and 6n + 5 is the same as 6n − 1 from the next block of six numbers. Therefore, any twin prime pair greater than 3 must have the form 6n − 1 and 6n + 1.

    That does not mean every pair of that form is prime. It only means twin primes must fit that pattern. For example, 11 and 13 fit and are twin primes, while 23 and 25 fit the shape but fail because 25 is composite.

    Special cases worth knowing

    Why 2 is not part of a twin prime pair

    2 and 4 differ by 2, but 4 is not prime. 2 and 3 are both prime, but their gap is 1. So 2 does not belong to any twin prime pair.

    Why 5 is unusual

    5 is the only prime that belongs to two twin prime pairs: (3, 5) and (5, 7). That happens because 3, 5, and 7 are all prime. Outside this case, three odd numbers separated by 2 cannot all be prime, because one of them will be divisible by 3.

    Why twin primes get harder to find

    As numbers grow, prime numbers become less frequent. Twin prime pairs still appear in computed ranges, but they become more widely spaced. Their continued appearance does not by itself prove that infinitely many exist.

    Why twin primes matter

    Twin primes lead to one of the best-known open questions in mathematics: the Twin Prime Conjecture. It states that there are infinitely many prime numbers p for which p + 2 is also prime.

    No accepted proof has confirmed that statement. Progress on bounded gaps shows that infinitely many prime pairs remain within a fixed distance of each other, but the exact distance of 2 has not been reached by an unconditional proof.

    Current Research Status

    Status as of July 31, 2026

    The Twin Prime Conjecture remains unsolved. It has not been proved that infinitely many prime pairs differ by exactly 2.

    The unconditional Polymath result is:

    H1 ≤ 246

    This proves that infinitely many pairs of consecutive primes have gaps of no more than 246.

    It does not prove that a gap of exactly 246 occurs infinitely often. It says that among the prime gaps occurring infinitely far along the number line, gaps no greater than 246 occur infinitely many times. The result does not identify the exact recurring gap, and it does not prove that the gap is 2.

    If pn is the nth prime, the quantity used in the bounded-gap result is:

    H1 = lim infn→∞(pn+1 − pn)

    The inequality H1 ≤ 246 means that prime gaps of 246 or less occur infinitely often. Since only finitely many even gap sizes lie between 2 and 246, at least one of those sizes must occur infinitely many times. The proof does not determine which size it is.

    What the current bounded-gap result does and does not prove
    StatementStatus
    Infinitely many consecutive prime pairs are no more than 246 apart.Proved unconditionally
    Infinitely many consecutive prime pairs differ by exactly 246.Not implied by the result
    Infinitely many prime pairs differ by exactly 2.Still unproved

    The bound comes from the Polymath8 work following advances by Yitang Zhang, James Maynard, and Terence Tao. The unconditional result is presented in Variants of the Selberg Sieve, and Bounded Intervals Containing Many Primes.

    Twin primes and nearby ideas

    On a prime-focused site, twin primes connect naturally to several nearby concepts:

    • Prime numbers: the base idea behind the pair.
    • Prime gaps: the distance between consecutive primes.
    • Isolated primes: primes that are not part of a twin prime pair.
    • Cousin primes: prime pairs that differ by 4.
    • Sexy primes: prime pairs that differ by 6.

    These related ideas place twin primes within the study of how primes are distributed across the integers. The gap of 2 is one case within the wider study of small and bounded prime gaps.

    How this connects to a prime checker

    Readers may want to test possible twin prime pairs. Each number must first be checked for primality, and the larger number must equal the smaller number plus 2.

    You can verify candidate pairs with the Prime Number Checker. Test both values separately, then subtract the smaller prime from the larger one to confirm that the gap is exactly 2.

    FAQ

    Are twin primes always consecutive primes?

    Yes. If two primes differ by 2, the number between them is even and greater than 2, so it cannot be prime.

    Is 2 part of any twin prime pair?

    No. The pair 2 and 4 has the right gap, but 4 is not prime. The pair 2 and 3 contains two primes, but the gap is 1, not 2.

    What is the smallest twin prime pair?

    The smallest twin prime pair is 3 and 5.

    Are there infinitely many twin primes?

    No one has proved that yet. The claim that infinitely many prime pairs differ by exactly 2 is the Twin Prime Conjecture, and it remains unsolved as of July 31, 2026.

    What does H1 ≤ 246 mean?

    It means infinitely many pairs of consecutive primes have gaps no greater than 246. It does not say that infinitely many pairs have a gap of exactly 246.

    Does the 246 bound prove the Twin Prime Conjecture?

    No. The Twin Prime Conjecture requires infinitely many prime pairs with a gap of exactly 2. The unconditional result only reduces the known upper bound for infinitely recurring small prime gaps to 246.

    Do all numbers of the form 6n − 1 and 6n + 1 make twin primes?

    No. Every twin prime pair greater than 3 must fit that form, but many such pairs fail because one or both numbers are composite.

    📌

    Complete guide: Prime Number Guides