*** Welcome to piglix ***

Relative prime


In number theory, two integers a and b are said to be relatively prime, mutually prime, or coprime (also written co-prime) if the only positive integer (factor) that divides both of them is 1. Consequently, any prime number that divides one does not divide the other. This is equivalent to their greatest common divisor (gcd) being 1.

The numerator and denominator of a reduced fraction are coprime. As specific examples, 14 and 15 are coprime, being commonly divisible only by 1, while 14 and 21 are not coprime, because they are both divisible by 7.

Standard notations for relatively prime integers a and b are: gcd(a, b) = 1 and (a, b) = 1. Graham, Knuth and Patashnik have proposed that the notation be used to indicate that a and b are relatively prime and that the term "prime" be used instead of coprime (as in a is prime to b).

A fast way to determine whether two numbers are coprime is given by the Euclidean algorithm.

The number of integers coprime to a positive integer n, between 1 and n, is given by Euler's totient function (or Euler's phi function) φ(n).


...
Wikipedia

...