nth_prime | R Documentation |
This function will use the primes
package unless it either is missing, or
if options("zulutils.zerodeps") has been explicitly set to false, in which
case it will use a local implementation of the sieve of Erastosthenes.
nth_prime(n)
n |
the position of the prime number to be calculated |
the nth prime number
nth_prime(1) # 2
nth_prime(10) # 29
nth_prime(100) # 541
nth_prime(1000) # 7919
nth_prime(10000) # 104729
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.