Relatively Prime Calculator
Check if numbers are coprime (relatively prime) by analyzing their greatest common divisor
Calculate Relatively Prime Numbers
Example Calculations
Example 1: Coprime Numbers
Numbers: 14 and 15
14 = 2 × 7
15 = 3 × 5
Common factors: None (only 1)
GCD: 1
Result: 14 and 15 are relatively prime ✓
Example 2: Not Coprime
Numbers: 18 and 27
18 = 2 × 3 × 3
27 = 3 × 3 × 3
Common factors: 3
GCD: 9
Result: 18 and 27 are NOT relatively prime ✗
Example 3: Set Analysis
Set: 21
GCD(4, 6, 21) = 1 → Setwise coprime ✓
GCD(4, 6) = 2 → Not pairwise coprime ✗
Result: Setwise coprime but not pairwise coprime
Quick Facts
Two numbers are coprime if their GCD is 1
Coprime numbers don't need to be prime themselves
The number 1 is coprime with every positive integer
Two even numbers can never be coprime
How to Check
Prime Factorization
Find prime factors of both numbers
Find Common Factors
Identify shared prime factors
Check Result
If only common factor is 1, they're coprime
Understanding Relatively Prime Numbers
What are Relatively Prime Numbers?
Relatively prime numbers, also called coprime numbers, are pairs of natural numbers that have only 1 as their common factor. This means no other number can divide both numbers evenly.
Key Properties
- •The GCD (Greatest Common Divisor) of coprime numbers is always 1
- •Coprime numbers don't have to be prime numbers themselves
- •If two numbers share any prime factor, they cannot be coprime
- •The number 1 is coprime with every positive integer
Algorithm: Euclidean Method
GCD(a, b) = GCD(b, a mod b)
If GCD(a, b) = 1, then a and b are coprime
Sets of Numbers
- •Setwise Coprime: GCD of all numbers in the set is 1
- •Pairwise Coprime: Every pair in the set is coprime
- •Pairwise coprime implies setwise coprime, but not vice versa
Example: The set 15 is setwise coprime (GCD = 1) but not pairwise coprime since GCD(6,10) = 2.