10.18 NextPrimeInt

NextPrimeInt( n )

NextPrimeInt returns the smallest prime which is strictly larger than the integer n.

Note that NextPrimeInt uses a probable-primality test (see IsPrimeInt).

    gap> NextPrimeInt( 541 );
    547
    gap> NextPrimeInt( -1 );
    2 

Previous Up Top Next
Index

GAP 3.4.4
April 1997