Function: prime
Section: number_theoretical
C-Name: prime
Prototype: L
Help: prime(n): returns the n-th prime (n C-integer).
Doc: the $n^{\text{th}}$ prime number
 \bprog
 ? prime(10^9)
 %1 = 22801763489
 @eprog\noindent Uses checkpointing and a naive $O(n)$ algorithm. Will need
 several minutes for $n$ up to $10^{11}$; make sure to start gp with
 \kbd{primelimit} at least $\sqrt{p_{n}}$, e.g. the value
 $\sqrt{n\log (n\log n)}$ is guaranteed to be sufficient; failing this condition
 can result in a slowdown of a factor at least~$30$.
 The running time varies a lot depending on the distance to the nearest
 checkpoint; the largest checkpoint is currently~$10^{11}$.
