up previous next
find the next largest prime number
This function computes the smallest prime number greater than N. If
N is negative or too large then the value zero is returned. This
function may generate primes larger than permitted as the
characteristic of a finite field in CoCoA. On most platforms primes
up to about 45000 can be generated; in some cases a higher limit
exists.
NextPrime(1000);
1009
-------------------------------
|