Skip to content

PrimeQ

Tests whether an integer is prime.

$ wo 'PrimeQ[7]'
True
$ wo 'PrimeQ[8]'
False

A complex argument is tested for Gaussian primality, and GaussianIntegers -> True applies the Gaussian test to a real integer.

$ wo 'PrimeQ[1 + I]'
True
$ wo 'PrimeQ[5, GaussianIntegers -> True]'
False