How many prime numbers are there under a million?
There are exactly 78,498 primes below one million, about 7.8% of the numbers in that range. Primes thin out predictably as you go up: there are 25 below 100, 168 below 1,000, 50,847,534 below a billion, and 37,607,912,018 below a trillion. Euclid proved around 300 BC that the primes never run out, so there is no largest one — but they get sparse enough that the density near a number n is roughly 1 in ln(n).
How the figure is arrived at
Sieve of Eratosthenes for the exact count, which a laptop finishes in milliseconds. The interesting part is how good the approximations are: the prime number theorem estimates n/ln(n) = 72,382, about 8% low, while the logarithmic integral Li(n) gives 78,628 — high by 130, an error of 0.17%. The gap between Li(n) and the true count is one of the deepest open questions in mathematics, and the Riemann hypothesis is a statement about how large it can get.
Other numbers and possibilities counts
- How many combinations does a Rubik's Cube have? 43,252,003,274,489,856,000 — about 43 quintillion
- How many ways can you shuffle a deck of cards? about 8 × 10^67
- How many possible chess games are there? about 10^120 games; about 4.8 × 10^44 legal positions
- How many combinations are there in the lottery? 292,201,338 for Powerball
- How many digits of pi have been calculated? about 202 trillion
- How many possible passwords are there? 6.6 quadrillion for eight characters — 540 sextillion for twelve
- How many Sudoku puzzles are there? 6,670,903,752,021,072,936,960 completed grids
- How many possible positions are there in Go? about 2.08 × 10^170
Common questions
- How many prime numbers are there under a million?
- exactly 78,498
- How is that estimated?
- Sieve of Eratosthenes for the exact count, which a laptop finishes in milliseconds. The interesting part is how good the approximations are: the prime number theorem estimates n/ln(n) = 72,382, about 8% low, while the logarithmic integral Li(n) gives 78,628 — high by 130, an error of 0.17%. The gap between Li(n) and the true count is one of the deepest open questions in mathematics, and the Riemann hypothesis is a statement about how large it can get.
Related pages
- How many combinations does a Rubik's Cube have? 43,252,003,274,489,856,000 — about 43 quintillion
- How many ways can you shuffle a deck of cards? about 8 × 10^67
- How many possible chess games are there? about 10^120 games; about 4.8 × 10^44 legal positions
- How many combinations are there in the lottery? 292,201,338 for Powerball
- How many digits of pi have been calculated? about 202 trillion
- How many possible passwords are there? 6.6 quadrillion for eight characters — 540 sextillion for twelve
- How many Sudoku puzzles are there? 6,670,903,752,021,072,936,960 completed grids
- How many possible positions are there in Go? about 2.08 × 10^170
- How many people are there in the world? Living things and the natural world
- How many stars are there in the universe? Space and the universe
- How many countries are there in the world? Things people built
- How many bones are in the human body? The human body
- How many grains of sand are there on Earth? Living things and the natural world
- How many ants are there in the world? Living things and the natural world
Sources
- Calculated on this page — At One Place