PrimeQ
returns
True
ifn
is a integer prime number.
returns
True
ifn
is a Gaussian prime number.
For very large numbers, PrimeQ
uses probabilistic prime testing, so it might be wrong sometimes (i.e. a number might be composite even though PrimeQ
says it is prime).
See
Examples
All prime numbers between 1
and 100
:
PrimeQ
has attribute Listable
:
The Gaussian integer 2 == (1 + i)*(1 − i)
isn’t a Gaussian prime number:
Implementation status
- ✅ - full supported