NEXTPRIME function
Description
NEXTPRIME(x) returns the first prime number larger than x. The argument x must be less than 999999999989 (the largest prime MedCalc will detect).
The argument x can be a real number or a matrix. When it is a matrix, the function returns a matrix with the same dimensions and with the NEXTPRIME function applied to all elements.
Examples
NEXTPRIME(19) returns 23