Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  Built-in Functions /  Programming /  Tests /

PrimeQ

FilledSmallSquare PrimeQ[expr] yields True if expr is a prime number, and yields False otherwise.

FilledSmallSquare PrimeQ[1] gives False.
FilledSmallSquare PrimeQ[-n], where n is prime, gives True.
FilledSmallSquare PrimeQ[n, GaussianIntegers->True] determines whether n is a Gaussian prime.
FilledSmallSquare Simplify[expr Primes] can be used to try to determine whether a symbolic expression is mathematically a prime.
FilledSmallSquare See The Mathematica Book on the web: Section 2.3.5, Section 3.1.1 and Section 3.2.4.
FilledSmallSquare Implementation Notes: see Section A.9.4.
FilledSmallSquare See also: FactorInteger, Primes.