Each whole number is drawn as a star. At the start the Sieve of Eratosthenes crosses out the multiples of 2, 3, 5, 7 and so on, until only primes stay bright. Primes that leave remainder 1 when divided by 4 are cyan, those that leave remainder 3 are gold, and composite numbers are faint violet dust. Three arrangements are available: a polar galaxy, the Sacks spiral and the Ulam spiral.

Keyboard: arrow keys move from prime to prime, plus and minus zoom, 0 resets the view, 1 to 3 switch the arrangement, Escape clears the selection.

Every star is a number. The bright ones are prime.

A planetarium of prime numbers

Touch the sky: hover a star to see its number, click to light up its prime factors, zoom in to find hidden spirals.

  • prime 4k + 1
  • prime 4k + 3
  • composite

Primes are the atoms of arithmetic.

Primearium is a free, multilingual home for the most fascinating facts, visualizations and games about prime numbers - for curious 12-year-olds and math graduates alike.

Did you know?

Fifteen facts that sound made up (but aren't)

Instant tool

Is it prime?

Type any whole number - even a huge one. You get the verdict, the prime factorization, the nearest primes and something fun about it.

Is your birthday prime?

Pick a date. We write it as DDMMYYYY and as YYYYMMDD and test both numbers.

Digits, spaces and commas are fine; you can also write powers like 2^89 - 1. Up to 300 digits.