WLJS LogoWLJS Notebook

NextPrime

NextPrime[x] gives the smallest prime above x.

  • NextPrime[x, k] gives the kth-next prime above x.

Examples

NextPrime[100]
(* 101 *)

Please visit the official Wolfram Language Reference for more details.

On this page