Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
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
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team