Open Problems

Twin Prime Conjecture

Count twin prime pairs — primes that differ by 2 — up to a chosen limit and plot how the count grows. The conjecture says this never stops, but nobody has proved it.

6 minLevel 2/3The interactive stage stays ad-free.
Limit10,000Twin pairs205Last pair(9929, 9931)Density20.50‰
4967 · 49695009 · 50115021 · 50235099 · 51015231 · 52335279 · 52815417 · 54195441 · 54435477 · 54795501 · 55035519 · 55215639 · 56415651 · 56535657 · 56595741 · 57435849 · 58515867 · 58695879 · 58816089 · 60916131 · 61336197 · 61996269 · 62716299 · 63016359 · 63616449 · 64516551 · 65536569 · 65716659 · 66616689 · 66916701 · 67036761 · 67636779 · 67816791 · 67936827 · 68296869 · 68716947 · 69496959 · 69617127 · 71297211 · 72137307 · 73097331 · 73337349 · 73517457 · 74597487 · 74897547 · 75497559 · 75617589 · 75917757 · 77597877 · 78797949 · 79518009 · 80118087 · 80898219 · 82218231 · 82338291 · 82938387 · 83898429 · 84318537 · 85398597 · 85998627 · 86298819 · 88218837 · 88398861 · 88638969 · 89718999 · 90019011 · 90139041 · 90439239 · 92419281 · 92839341 · 93439419 · 94219431 · 94339437 · 94399461 · 94639629 · 96319677 · 96799719 · 97219767 · 97699857 · 98599929 · 9931

Twin primes differ by 2, like (11, 13). The count keeps rising as N grows, but more slowly. In 2013 Zhang proved some bounded prime gap repeats forever; the gap has since dropped to 246 — but the specific gap of 2 is still unproven.

What you are seeing

1

A sieve marks all primes up to the limit.

2

We scan the primes and count consecutive pairs that differ by exactly 2, such as (3,5), (11,13), (17,19).

3

The chart shows the running count, which keeps climbing but more slowly.

Why it matters

In 2013 Yitang Zhang proved that some prime gap of finite size repeats forever, a breakthrough toward the twin prime conjecture. The gap has since been pushed down to 246, but the specific gap 2 remains open.

Complexity & details

Sieve is O(n log log n); a single scan collects all twin pairs.

Frequently asked questions

Are there infinitely many twin primes?+

This is exactly the conjecture. It is widely believed true and supported by heuristic estimates, but unproven.

What did Zhang prove?+

That infinitely many prime pairs are separated by some bounded gap, originally 70 million and now 246.