Relatively Prime Calculator – Guide & Formulas
Check if two numbers are relatively prime (coprime). Find the GCD and verify if numbers share any common factors other than 1.
Check if two numbers are relatively prime (coprime) with our free online calculator. Enter two numbers to see their GCD and verify if they share common factors.
Key Takeaway
Use the free Relatively Prime Calculator to check if two numbers are relatively prime (coprime). find the gcd and verify if numbers share any common factors other than 1. Get instant results with step-by-step explanations.
How to Use the Relatively Prime Calculator
- Step 1: Enter the first positive integer
- Step 2: Enter the second positive integer
- Step 3: Click Calculate to see if they are relatively prime
- Step 4: Review the GCD and prime factorization of both numbers
The Formula
Variable Definitions
- GCD: Greatest Common Divisor — the largest integer that divides both numbers
- a, b: The two positive integers being tested for coprimality
- Relatively Prime: Having no common prime factors; their GCD equals 1
- Prime Factorization: Breaking a number into its prime number factors
Checking if 14 and 25 Are Relatively Prime
Determine whether 14 and 25 share any common factors.
- Step 1: Prime factorize 14: 14 = 2 × 7
- Step 2: Prime factorize 25: 25 = 5²
- Step 3: Compare factors: no common prime factors exist
- Step 4: GCD(14, 25) = 1
- Step 5: Since GCD = 1, 14 and 25 ARE relatively prime (coprime)
Frequently Asked Questions
What does relatively prime mean?
Two numbers are relatively prime (also called coprime) if their Greatest Common Divisor (GCD) is 1 — they share no common prime factors.
Is 1 relatively prime to every number?
Yes. The GCD of 1 and any positive integer is always 1, so 1 is coprime to all positive integers.
Can two even numbers be relatively prime?
No. Any two even numbers both share 2 as a factor, so their GCD is at least 2, meaning they cannot be coprime.
What are relatively prime numbers used for?
They are essential in cryptography (RSA encryption), modular arithmetic, simplifying fractions, and the Chinese Remainder Theorem.
How do I find all pairs of relatively prime numbers up to N?
Two numbers a and b are coprime if and only if gcd(a,b) = 1. You can use the Euclidean algorithm to efficiently compute GCDs for all pairs.