public BigInteger NextProbablePrime()
{
if (sign < 0)
throw new ArithmeticException("Cannot be called on value < 0");
if (CompareTo(Two) < 0)
return Two;
BigInteger n = Inc().SetBit(0);
while (!n.CheckProbablePrime(100, RandomSource))
{
n = n.Add(Two);
}
return n;
}