What is the correlation between $n$ and $n$-th prime?

71 Views Asked by At

It looks like the gap between $n$ and the $n$-th prime is increasing as $n$ gets bigger.

Is there any function describing this increase?

If I would like to find the $n$-th prime with the sieve of Eratosthenes, what is the smallest array I can use?

2

There are 2 best solutions below

0
On

It looks like the best answer to the last question is:

n(ln(n)) + n(ln(ln(n)))

But I did not find any proof this is the smallest number for an upper bound can be calculated.

I sort of answered my own question because no one willing to. In comments the wikipedia link to prime theory doesn't help, it's the same telling me: "Find the answers in mathematics". p^2 is obviously too big, there is much smaller solution. I got down voted god knows why. You just scaring away curious people from science.

0
On

By the prime number theorem, there are about $N/$$\log(N)$ primes less then or equal to $N$. So the $N$th prime is roughly $N$$\log N$. As you might notice, the $N$th prime is not exponentially smaller or larger than $N$. It is almost the same size as $N$, slightly larger. Of course, there are better approximations.