Method on @sym: nextprime (x)

Return the next prime number.

Example:

nextprime(sym(2))
  ⇒ ans = (sym) 3

nextprime([sym(2) 10 0 -1 65530])
  ⇒ (sym) [3  11  2  2  65537]  (1×5 matrix)

See also: @sym/isprime, @sym/prevprime.

Package: symbolic