nth_prime {primes} | R Documentation |
Get the n-th Prime from the Sequence of Primes.
Description
Get the n-th prime, p_n
, in the sequence of primes.
Usage
nth_prime(x)
Arguments
x |
an integer vector. |
Value
An integer vector.
Author(s)
Paul Egeler, MS
Examples
nth_prime(5)
## [1] 11
nth_prime(c(1:3, 7))
## [1] 2 3 5 17
[Package primes version 1.6.0 Index]