Ramanujan primes

From Rosetta Code
Revision as of 06:27, 3 September 2021 by Wherrera (talk | contribs) (Created page with "{{draft task}} As the integers get larger, the spacing between prime numbers slowly lengthens, but the spacing between primes increases at a slower rate than the numbers them...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Ramanujan primes is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

As the integers get larger, the spacing between prime numbers slowly lengthens, but the spacing between primes increases at a slower rate than the numbers themselves increase. A consequence of this difference in rates of increase is the existence of special primes, called Ramanujan primes.

The `n`th Ramanujan prime is defined to be the least integer for which there are at least n primes between x and x/2 for all x greater or equal to n.

Task
  • Generate and show the first 100 Ramanujan prime numbers.
    Find and show the 1000th Ramanujan prime number.
Stretch task

Find and show the 10,000th Ramanujan prime number.

See also