This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

CoprimeQ

CoprimeQ
yields True if and are relatively prime, and yields False otherwise.
CoprimeQ
yields True if all pairs of the are relatively prime, and yields False otherwise.
  • The can be Gaussian integers.
8, 9, and 11 are relatively prime:
8, 9, and 11 are relatively prime:
In[1]:=
Click for copyable input
Out[1]=
CoprimeQ works with numbers of any size:
CoprimeQ threads itself element-wise over lists:
Gaussian integers:
Plot pairs of numbers that are relatively prime:
Find the fraction of pairs of the first 100 numbers that are relatively prime:
The result is close to :
Find the first 2x2 block of white squares in the array of coprime numbers:
Plot which triples of numbers are relatively prime:
2D slices:
New in 6