NEXTPRIME INDEX

NEXTPRIME _ _ _ _ _ _ _ _ _ _ _ _ operator

syntax:

nextprime(<expression>)

If the argument of nextprime is an integer, the least prime greater than that argument is returned. Otherwise, a type error results.

examples:


nextprime 5001; 

  5003  


nextprime(10^30); 

  1000000000000000000000000000057 


nextprime a; 

  ***** A invalid as integer