Back

Prime Pairs

Medium
Created: March 5, 2026

Twin primes are pairs of prime numbers that differ by exactly 2 — for example, 11 and 13, or 17 and 19.

For any pair of twin primes greater than 3, prove that the number between them is always divisible by 6.

Hint

Any integer divided by 6 leaves a remainder of 0, 1, 2, 3, 4, or 5. What can you rule out?

Solution

The middle number between any pair of twin primes (greater than 3) is always divisible by 6.

Let’s call the middle number xxx and write x=6n+rx = 6n + rx=6n+r, where nnn is a non-negative integer and rrr is the remainder when xxx is divided by 6. We need to show that r=0r = 0r=0.

The remainder rrr can only be 0, 1, 2, 3, 4, or 5. We’ll eliminate every possibility except r=0r = 0r=0 by showing each leads to a contradiction.

  1. Case 1: rrr is odd (r=1r = 1r=1, 333, or 555)
  2. Case 2: r=2r = 2r=2
  3. Case 3: r=4r = 4r=4

Case 1 - rrr is odd (r=1r = 1r=1, 333, or 555): Since 6n6n6n is always even, x=6n+rx = 6n + rx=6n+r is odd whenever rrr is odd. But if xxx is odd, then both x1x - 1x1 and x+1x + 1x+1 are even. The only even prime is 2, so we can’t have two even primes in a twin pair. This rules out r=1,3,r = 1, 3,r=1,3, and 555.

Case 2 - r=2r = 2r=2: The upper twin prime is x+1=6n+3=3(2n+1)x + 1 = 6n + 3 = 3(2n + 1)x+1=6n+3=3(2n+1). Since both primes are greater than 3, we have n1n \geq 1n1, so 2n+132n + 1 \geq 32n+13. This means x+1x + 1x+1 is a multiple of 3 greater than 3, so it can’t be prime. This rules out r=2r = 2r=2.

Case 3 - r=4r = 4r=4: The lower twin prime is x1=6n+3=3(2n+1)x - 1 = 6n + 3 = 3(2n + 1)x1=6n+3=3(2n+1). By the same reasoning as case 2, x1x - 1x1 is a multiple of 3 greater than 3, so it can’t be prime. This rules out r=4r = 4r=4.

The only remaining possibility is r=0r = 0r=0, which means xxx is divisible by 6.

Try These Next