Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > Prime Numbers >

NextPrime

NextPrime[n]
gives the next prime above n.
NextPrime[n, k]
gives the k^(th) prime above n.
  • The number k can be negative, giving previous primes.
  • The number n need not be an integer, and can be negative.  »
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team