NextPrime
[n]NextPrime
[n,k]NextPrime[100]
The the first number does not have to be an integer:
NextPrime[100.5, 2]
However, when the second value, the step value is not an integer is given, we do nothing:
NextPrime[100, 2.5]
With a negative number, we find a prime number before the given number:
NextPrime[100, -1]
And with negative counts, it is possible to get negative prime numbers:
NextPrime[2, -1]