up previous next
find the next largest probable prime number
NextProbPrime(N: INT): INT
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.