DOCUMENTATION CENTER SEARCH
Mathematica
>
Prime Numbers
>
Built-in
Mathematica
Symbol
Integer and Number Theoretic Functions
Tutorials »
|
Prime
PrimePi
RandomPrime
PrimeQ
See Also »
|
Number Theoretic Functions
Number Theory
Prime Numbers
New in 6.0: Mathematics & Algorithms
New in 6.0: Number Theory & Integer Functions
More About »
NextPrime
NextPrime
[
n
]
gives the next prime above
.
NextPrime
[
n
,
k
]
gives the
prime above
.
MORE INFORMATION
The number
can be negative, giving previous primes.
The number
need not be an integer, and can be negative.
»
EXAMPLES
CLOSE ALL
Basic Examples
(2)
The next prime after a million:
In[1]:=
Out[1]=
The last prime before a million:
In[1]:=
Out[1]=
Scope
(3)
Applications
(2)
Properties & Relations
(1)
SEE ALSO
Prime
PrimePi
RandomPrime
PrimeQ
TUTORIALS
Integer and Number Theoretic Functions
MORE ABOUT
Number Theoretic Functions
Number Theory
Prime Numbers
New in 6.0: Mathematics & Algorithms
New in 6.0: Number Theory & Integer Functions
New in 6
© 2008 Wolfram Research, Inc.