nextProbablePrime

Returns the first integer greater than this BigInteger that is probably prime. The probability that the number returned by this method is composite does not exceed 2-100. This method will never skip over a prime when searching: if it returns p, there is no prime q such that this < q < p.

Return

the first integer greater than this BigInteger that is probably prime.

Since

1.5

Throws

this < 0 or this is too large.