Details and Options
- PrimeQ gives False.
- PrimeQ[-n], where n is prime, gives True.
- PrimeQ[n,GaussianIntegers->True] determines whether n is a Gaussian prime.
- PrimeQ[m+In] automatically works over the Gaussian integers.
- Simplify[expr∈Primes] can be used to try to determine whether a symbolic expression is mathematically a prime.
Examplesopen allclose all
- Demonstrations with PrimeQ (Wolfram Demonstrations Project)
- Implementation notes: Numerical and Related Functions
- An Elementary Introduction to the Wolfram Language: More about Numbers
- An Elementary Introduction to the Wolfram Language: Tests and Conditionals
- An Elementary Introduction to the Wolfram Language: Debugging Your Code
- NKS|Online (A New Kind of Science)
Introduced in 1988
(1.0)| Updated in 2003