Goldbach Conjecture Calculator & Visualizer
Enter an even number and explore all prime pairs that sum to it. Experiment with the famous Goldbach conjecture interactively.
Goldbach Conjecture Explorer
The classic (strong) Goldbach conjecture states that every even integer > 2 can be written as the sum of two primes.
Quick examples
Current even number
100
Prime pairs found
0
Press “Calculate prime pairs” to see all Goldbach decompositions for 100.
Prime pair decompositions
What is Goldbach’s conjecture?
Goldbach’s conjecture is one of the oldest and most famous unsolved problems in number theory. In its modern (strong) form it states:
Every even integer N > 2 can be written as the sum of two prime numbers.
For example:
- 4 = 2 + 2
- 10 = 3 + 7 = 5 + 5
- 28 = 5 + 23 = 11 + 17
- 100 = 3 + 97 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53
The calculator above lets you experiment with this statement by listing all prime pairs \( (p, q) \) such that \( p + q = N \) for a chosen even number \( N \).
Strong vs. weak Goldbach conjecture
There are two closely related statements usually called Goldbach’s conjectures:
Strong (binary) Goldbach conjecture
The version implemented by this tool:
For every even integer \( N > 2 \), there exist primes \( p, q \) such that \( N = p + q \).
Weak (ternary) Goldbach conjecture
The weak conjecture says that every odd integer greater than 5 can be written as the sum of three primes:
For every odd integer \( n > 5 \), there exist primes \( p, q, r \) such that \( n = p + q + r \).
The weak conjecture was proven in 2013 by Harald Helfgott, using a combination of analytic number theory and extensive computation. The strong conjecture, however, remains open.
How the calculator finds Goldbach pairs
For a given even integer \( N \), the algorithm used in this page is:
- Generate all prime numbers up to \( N \) using a fast sieve (Sieve of Eratosthenes).
- For each prime \( p \le N \), compute \( q = N - p \).
- If \( q \) is also prime and \( p \le q \), record the pair \( (p, q) \).
This ensures that each unordered pair \( \{p, q\} \) is listed only once when “Show each pair once” is enabled.
Complexity and limits
The sieve runs in roughly \( O(N \log \log N) \) time and uses \( O(N) \) memory, which is very fast for values up to about 1,000,000 in a modern browser. That is why the input is capped at 1,000,000.
What is known about Goldbach’s conjecture?
Although no complete proof is known, mathematicians have made substantial progress:
- Computational verification: The conjecture has been checked for all even numbers up to at least \( 4 \times 10^{18} \) (4 quintillion) using large-scale computations.
- Almost all even numbers: Analytic results show that “almost all” even integers satisfy Goldbach’s conjecture, in the sense that the set of exceptions has density zero.
- Weaker forms: The weak Goldbach conjecture (three primes for odd numbers) is proven.
Despite this, a general proof that every even integer greater than 2 is the sum of two primes is still missing.
Patterns you can explore with the tool
By sliding through even numbers and watching the list of prime pairs, you can observe several patterns:
- The number of decompositions tends to grow as \( N \) increases.
- Many decompositions involve the small prime 3 or 5.
- Pairs are symmetric: if \( N = p + q \), then also \( N = q + p \), but we count each unordered pair once.
FAQ
Is Goldbach’s conjecture proven?
No. It is supported by overwhelming numerical evidence and strong partial results, but a full proof (or counterexample) is still unknown.
Could this calculator find a counterexample?
In principle, if you tried an even number that had no prime decomposition, that would be a counterexample. In practice, our range (up to 1,000,000) is far below the limits already checked by professional computations, so you will not find a new counterexample here.
Why do we only consider even numbers?
The strong Goldbach conjecture is specifically about even integers. Odd integers are covered by the weak (three-prime) version instead.
Can an even number have many different Goldbach decompositions?
Yes. For example, 100 has six distinct decompositions into two primes. As numbers grow, the number of decompositions generally increases, though irregularly.