Primes
Check a number, watch a sieve, wind an Ulam spiral, and find out why every public-key cipher needs primes.
Primes are the quiet engine of public-key cryptography, and a good deal of fun besides. Everything interactive here uses exact big-integer arithmetic in your browser. Start with the prime of the day, or with the checker.
The prime of the day
Every date has its own prime, picked by a fixed rule from a rotating list of kinds. It's the same for everyone on the same date, and your browser works it out on the spot.
Worked out in your browser from the date alone, so everyone sees the same prime on the same day.
Prime numbers
- Is it prime?Type a number of up to 300 digits and see whether it's prime, what its factors are if not, and every curious property it has.
- The sieve of EratosthenesWatch the oldest prime-finding algorithm cross out multiples, then time three ways of running it up to a hundred million.
- The Ulam spiralWrite the numbers in a spiral and mark the primes, and they fall on diagonals. Zoom, pan, start anywhere, and highlight Euler's polynomial.
- Mersenne Prime: the numbers that are all onesWhat a Mersenne prime is, all 52 from Euclid to the 41-million-digit 52nd, the friar, the chessboard, the screensaver years, and what the GPUs changed.
- The largest known prime numberA 41-million-digit Mersenne prime, with its first and last digits worked out live, the Lucas-Lehmer test you can run, and Euclid's proof that there's no largest.
- List of Mersenne primesEvery known Mersenne prime in one table: exponent, digits, date, who found it and on what machine, plus the records, the out-of-order finds and the forecast.
- Will we run out of primes for RSA?The prime number theorem worked out for 1,024 bits, a live generator that finds one in your browser, and what happened when real keys shared a prime.
- Is my birthday prime?Your date as a number in seven formats, which of them are prime, the next prime date, and a year of prime days.
- Is my name prime?Read a name as a number, check it, find the nearest prime names, and see the code that gives every anagram the same number.
- Twin primes and the gap that keeps shrinkingEvery gap between primes up to ten million, charted, and the story from Zhang's 70 million to the bound of 246.
- Goldbach's conjectureEvery even number as a sum of two primes: find the pairs for any number, and see the Goldbach comet.
- Cicada prime numbers: why 13 and 17 yearsPeriodical cicadas come out every 13 or 17 years. A timeline and a table show the arithmetic, and the page is plain about what's only a hypothesis.
- The illegal primeA prime whose digits are a banned program. Turn your own text into a prime, and read why DeCSS made a number a legal question.
- Prime or not?Sixty seconds, one number at a time, prime or not. It starts easy and ends with Carmichael numbers, which fool the Fermat test.
- The Riemann hypothesis, without the jargonCount the primes yourself, plot them against Li(x), and see the error band the hypothesis promises. No hype.