Finding the n-th prime number

by kelalaka   Last Updated October 11, 2018 15:20 PM - source

We can store all the primes up to $l$ in a list. The list, however, will be impractical.

Question is: given $n$ find the $n-th$ prime.

The interesting part, actually, we don't need to find exactly $n-th$ prime. Finding a unique prime for each $i, 1 \leq i \leq n$ is enough.

Answers 1

Mathematica can find the $n$th prime extremely quickly. For instance, it can find the $10^{10}$th prime ($252097800623$) in $0.55$ seconds.

David G. Stork
David G. Stork
October 11, 2018 15:17 PM

Related Questions

about infinite bounded prime gaps

Updated June 06, 2017 11:20 AM

Prime numbers in factorizations of natural numbers

Updated November 03, 2017 15:20 PM