CompositeQ

CompositeQ[expr]

yields True if expr is a composite number, and yields False otherwise.

Details and Options

  • CompositeQ[n] gives True if n is a product of two integers with absolute values greater than one.
  • CompositeQ[n,GaussianIntegers->True] determines whether n is a product of two Gaussian integers with absolute values greater than one.
  • CompositeQ[m+In] automatically works over the Gaussian integers.

Examples

open allclose all

Basic Examples  (1)

Test whether a number is composite:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Scope  (1)

Options  (1)

Applications  (3)

Neat Examples  (3)

See Also

FactorInteger  PrimeQ  Prime  Primes  PrimePowerQ  CoprimeQ  GCD

Tutorials

Introduced in 2014
(10.0)