The idea in plain English: Take any even number greater than 2. You can always find two prime numbers that add up to it. That's it. 4 = 2+2. 6 = 3+3. 8 = 3+5. 10 = 3+7 (or 5+5). No matter how large the even number, there's always at least one pair of primes that sum to it. Each such pair is called a Goldbach partition. The puzzle asks you to find one such partition for a given even number.
Why this really exists: The conjecture was first stated by Prussian mathematician Christian Goldbach in a 1742 letter to Leonhard Euler. Euler — one of history's greatest mathematicians — called it "completely certain" even though he couldn't prove it. Over 280 years later, it remains one of the most famous unsolved problems in number theory. It's been verified by computer for all even numbers up to 4 × 10¹⁸ (that's 4,000,000,000,000,000,000), but a general proof still eludes us. Understanding prime distribution is central to modern cryptography.
Let's find Goldbach partitions for two numbers:
Notice that a number can have multiple valid partitions. The puzzle accepts any valid pair. The key insight: you only need to check primes up to n/2, because after that the pairs just reverse.
1. You are given an even integer n (n > 2)
2. Generate a list of all prime numbers up to n
3. For each prime p in the list (where p ≤ n/2):
4. Let q = n - p
5. Check if q is also prime
6. If yes, (p, q) is a valid Goldbach partition
7. Return the pair as your answer
💡 For efficiency, pre-compute primes with the Sieve of Eratosthenes if your n is large. The puzzle numbers stay modest, but the pattern scales.
| Difficulty | What to Expect | Example n | Sample Partition |
|---|---|---|---|
| 1 | Small even numbers (4–30), partitions obvious | 12 | (5, 7) |
| 2 | Moderate numbers (up to 200), slightly larger primes | 98 | (19, 79) |
| 3 | Larger numbers (up to 2,000), primes less intuitive | 1,000 | (3, 997) or (59, 941) |
| 4 | Large range (up to 10,000+), requires prime detection | 10,000 | (3, 9997) or (59, 9941) |
⚠️ Difficulty 5+ puzzles may use the weak Goldbach conjecture variant (odd numbers as sum of three primes), which was proven in 2013 by Helfgott.