Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on 2^74207281-1 is Prime. Parent comment
So with the kth prime ~= k log k, the ratio of primes is 1 / log k. Yes that drops to zero, but very slowly.
You can use the upper bound of the kth prime to build a sufficiently large sieve, which can be done O(n).
There are no comments on this comment yet.
So with the kth prime ~= k log k, the ratio of primes is 1 / log k. Yes that drops to zero, but very slowly.
You can use the upper bound of the kth prime to build a sufficiently large sieve, which can be done O(n).