Interactive · Every prime
Every prime from 1 up to as high as you dare.
Start at 1000, then crank N up. In the Ulam spiral the numbers wind out from the center and the primes fall onto unexplained diagonal streaks. In the grid they lay out in reading order. Either way you can watch the primes thin out as the numbers get large.
up to 10,000up to 100,000up to 500,000up to 1,000,000up to 5,000,000up to 10,000,000
range
1 … 400,000
primes found π(N)
33,860
prime density
8.5%
Each gold dot is a prime. In the Ulam spiral the integers wind out from the center (1 in the middle, counter-clockwise). Primes mysteriously line up along diagonal streaks — those are quadratic polynomials like
4n² + n + 41 that happen to be prime-rich. Nobody fully explains the diagonals; that's the famous surprise. As N grows the primes visibly thin out — density drops toward 1 / ln N.These are the same primes that pair up in the comet and first-primes tabs — here shown raw, no Goldbach. The diagonals in the spiral come from prime-rich quadratics; the overall thinning is the Prime Number Theorem, π(N) ≈ N / ln N.