nth_prime: Get the n-th Prime from the Sequence of Primes.

View source: R/RcppExports.R

nth_primeR 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

Ironholds/primes documentation built on Feb. 1, 2024, 1:26 a.m.