Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Number Theoretic Functions > CoprimeQ >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF