nextprime {gmp} | R Documentation |
Return next prime number geater than n
nextprime(n)
n |
Integer |
This function uses probabilistic algorithm to identify primes. For practical purposes, it's adequat, the chance of a composit passing will be extremely small.
A (probably) prime number
Antoine Lucas
Gnu MP Library see http://swox.com/gmp
nextprime(14)