Lesson goal: The Goldbach partition gap on 126

Previous: Four-digit numbers with end difference of 2 | Home | Next: The four-statement truth and liar puzzle

In the 1973 MAA Annual High School Mathematics Examination (Part 1, Problem #3), students explored one of the oldest unsolved problems in mathematics:

"The stronger Goldbach conjecture states that any even integer greater than 7 can be written as the sum of two different prime numbers. For such representations of the even number 126, the largest possible difference between the two primes is: (A) 112 (B) 100 (C) 92 (D) 88 (E) 80."

Christian Goldbach proposed in 1742 that every even number greater than 2 is the sum of two primes. The "stronger" version requires the two primes to be different ($p_1 < p_2$ such that $p_1 + p_2 = 126$).

To maximize the gap between the two primes: $$\text{Difference} = p_2 - p_1 = (126 - p_1) - p_1 = 126 - 2p_1$$ Notice that to maximize $126 - 2p_1$, we need to find the smallest possible prime $p_1$ such that $126 - p_1$ is also prime!

Let's test primes $p_1$ starting from the smallest odd prime:
  • $p_1 = 3$: $126 - 3 = 123 = 3 \times 41$ (composite, not prime)
  • $p_1 = 5$: $126 - 5 = 121 = 11^2$ (composite)
  • $p_1 = 7$: $126 - 7 = 119 = 7 \times 17$ (composite)
  • $p_1 = 11$: $126 - 11 = 115 = 5 \times 23$ (composite)
  • $p_1 = 13$: $126 - 13 = 113$. Is 113 prime? $\sqrt{113} \approx 10.63$. Testing primes $\le 10$: $113$ is not divisible by 2, 3, 5, or 7 ($113 = 7 \times 16 + 1$). Therefore, 113 is prime!
Thus, the pair with the smallest $p_1$ is $(13, 113)$, and the largest possible difference is: $$113 - 13 = \mathbf{100}$$

In this lesson, we use the built-in is_prime(n) function in Lua to find all Goldbach pairs for 126, and explore the distribution of prime partitions!

Now you try. Replace ???? with N and run the code to see all 8 prime pairs and the maximum difference of 100.

Type your code here:


See your results here: