Solvezi.com
Home
Tools
Blog
About
Contact
  1. Home
  2. Number Theory
  3. Co-Prime Checker

Co-Prime Checker

Check whether two given numbers are co-prime or relatively prime using this simple checker.

Related Tools

More in Number Theory

LCM CalculatorGCF CalculatorFactor CalculatorBig Number CalculatorPrime Number CheckerPrime Factorization CalculatorTwin Prime CheckerPerfect Number CheckerArmstrong Number CalculatorPalindrome Number CheckerHarshad (Niven) Number CheckerAutomorphic Number CheckerMagic Number Checker
Explore Other Categories

Share

https://www.solvezi.com/number-theory/co-prime-checker

Solvezi.com

Solve Easy
Privacy PolicyTerms
© 2026 Solvezi.com. All rights reserved.
Euclidean Logic
Consecutive integers are always co-prime!

What are Co-Prime Numbers?

Two numbers are called co-prime (or relatively prime) if their Greatest Common Divisor (GCD) is 1. This means they share no common prime factors.

For example, 8 and 15 are co-prime because GCD(8, 15) = 1. However, 12 and 18 are not co-prime because GCD(12, 18) = 6.

Understanding Co-Prime Numbers

Key insight: Co-prime numbers don't need to be prime themselves! They just need to have no common factors.

✓ Co-Prime Pairs:

(8, 15), (9, 14), (21, 22), (35, 36)

✗ Not Co-Prime:

(12, 18), (15, 25), (21, 28), (30, 45)

Euclidean Algorithm

Most efficient way to find GCD.

GCD(15, 8):
15 = 1 × 8 + 7
8 = 1 × 7 + 1
7 = 7 × 1 + 0
GCD = 1

Prime Factorization

Check for common prime factors.

8 = 2³
15 = 3 × 5
No common primes!
✓ Co-Prime

Consecutive Numbers Rule

Any two consecutive integers are co-prime.

Examples:
(8, 9) → GCD = 1 ✓
(100, 101) → GCD = 1 ✓
(n, n+1) always works!
Universal rule

Co-Prime Examples

Co-Prime Example
8 and 15

1Euclidean Algorithm Steps:

GCD(15, 8): 15 ÷ 8 = 1 remainder 7
GCD(8, 7): 8 ÷ 7 = 1 remainder 1
GCD(7, 1): 7 ÷ 1 = 7 remainder 0
GCD = 1 → Co-Prime!
GCD = 1
Co-Prime ✓
Not Co-Prime
12 and 18

1Euclidean Algorithm Steps:

GCD(18, 12): 18 ÷ 12 = 1 remainder 6
GCD(12, 6): 12 ÷ 6 = 2 remainder 0
GCD = 6 → Not Co-Prime
Common factors: 2, 3, 6
GCD = 6
Not Co-Prime ✗
Consecutive Numbers
41 and 42

1Euclidean Algorithm Steps:

GCD(42, 41): 42 ÷ 41 = 1 remainder 1
GCD(41, 1): 41 ÷ 1 = 41 remainder 0
GCD = 1 → Co-Prime!
All consecutive numbers are co-prime
GCD = 1
Co-Prime ✓
Prime Pair
17 and 19

1Euclidean Algorithm Steps:

Two different prime numbers
GCD(19, 17): 19 ÷ 17 = 1 remainder 2
GCD(17, 2): 17 ÷ 2 = 8 remainder 1
GCD(2, 1): 2 ÷ 1 = 2 remainder 0
GCD = 1 → Co-Prime!
GCD = 1
Co-Prime ✓

Properties of Co-Prime Numbers

PropertyDescriptionExample
GCD = 1The defining propertyGCD(8, 15) = 1
No common primesShare no prime factors8 = 2³, 15 = 3 × 5
Consecutive numbersAlways co-primen and n+1
1 is special1 is co-prime with every numberGCD(1, n) = 1
Prime pairsTwo different primes(13, 17), (19, 23)
Euler's totientφ(n) counts co-primes < nφ(8) = 4

Real-World Applications

RSA Cryptography

Uses co-prime numbers for encryption keys

Fraction Simplification

Numerator & denominator must be co-prime

Modular Arithmetic

Multiplicative inverses require co-prime

Clock Arithmetic

Co-prime step sizes hit all numbers

Frequently Asked Questions

Can two even numbers be co-prime?

No! Any two even numbers share at least a factor of 2, so their GCD is at least 2.

Is 1 co-prime with every number?

Yes! GCD(1, n) = 1 for any positive integer n, so 1 is co-prime with everything.

What's the difference between co-prime and prime?

Primes are numbers with exactly 2 factors. Co-prime is a relationship between two numbers that share no common factors.

How many numbers are co-prime to n?

Euler's totient function φ(n) counts numbers less than n that are co-prime to n. Example: φ(8) = 4 (1,3,5,7).

Interesting Facts About Co-Prime Numbers

Consecutive integers are always co-prime!
8 and 15 are co-prime, yet neither is prime
RSA encryption relies on co-prime numbers
The Euclidean algorithm is over 2,300 years old

The Co-Prime Condition

GCD(a, b) = 1 ⟺ a and b are co-prime

Where GCD is the Greatest Common Divisor

Example: GCD(8, 15) = 1 → 8 and 15 are co-prime