up previous next
NextProbPrime

find the next largest probable prime number

Syntax
NextProbPrime(N: INT): INT

Description
This function computes the smallest probable prime number greater than N. If N is negative, an error is generated. To be absolutely certain the number produced is prime, you must call IsPrime on it, but this may be very costly.

Example
/**/  NextProbPrime(1000);
1009

/**/  NextProbPrime(10^50);
100000000000000000000000000000000000000000000000151

See Also