Bruno Prime — Prime numbers as a working topic: how | brunoprime.com

Bruno Prime — Prime numbers as a working topic: how | brunoprime.com

How Primes Thin Out: Counting Below a Limit

The prime number theorem turns a vague sense of rarity into a usable estimate, confirmed by exact counts at four reference points.

The prime number theorem states that the number of primes at or below x, written π(x), is asymptotically x / ln x. Because the natural logarithm grows without bound, the ratio π(x) / (x / ln x) approaches 1 while the density of primes near x, about 1 / ln x, keeps falling.

Exact counts anchor the estimate. There are 25 primes below 100, and 50,847,534 primes below one billion. Plugging those limits into x / ln x gives values within a fraction of a percent of the true counts.

The signature mark of this site, drawn as a plate

On narrow screens, swipe or scroll the plate sideways.

Gaps between consecutive primes average about ln x near the size x. Around 100 the average gap is near 4.6; around one billion it is near 20. Individual gaps vary widely — twin primes two apart still occur, the smallest being 3 and 5, 5 and 7, and 11 and 13.

Goldbach's conjecture, that every even number above 2 is the sum of two primes, has been verified for all even numbers up to 4 × 10^18. That bound is a statement about how plentiful pairs of primes remain even deep into the number line.

The thinning is steady and predictable, which is exactly what cryptographic key sizes rely on: you always know roughly how many primes of a given bit length exist, and therefore how large a modulus you need.

  • Below 10: 4 primes.
  • Below 100: 25 primes.
  • Below 10^6: 78,498 primes.
  • Below 10^9: 50,847,534 primes.
  • Average gap near x: about ln x.

Further reading