Calculator Form
Example Data Table
| First Integer | Second Integer | GCD | Relatively Prime? | Reason |
|---|---|---|---|---|
| 35 | 64 | 1 | Yes | No common factor greater than 1 exists. |
| 24 | 36 | 12 | No | Both numbers share 2, 3, 4, 6, and 12. |
| 17 | 40 | 1 | Yes | Prime 17 does not divide 40. |
| 81 | 54 | 27 | No | Both numbers contain a large common power of 3. |
Formula Used
Relative Prime Rule
a and b are relatively prime when gcd(a, b) = 1.
Euclidean Algorithm
Repeatedly divide until the remainder becomes zero:
a = bq + r, then replace (a, b) with (b, r).
Bézout Identity
There exist integers x and y such that ax + by = gcd(a, b).
Useful Derived Values
LCM(a, b) = |ab| / gcd(a, b) when both numbers are nonzero.
When gcd(a, m) = 1, the modular inverse of a modulo m exists.
How to Use This Calculator
- Enter the first whole number in the first field.
- Enter the second whole number in the second field.
- Click Check Relative Prime Status.
- Read the result summary shown above the form.
- Review gcd, factorization, Bézout coefficients, totients, and inverses.
- Inspect the Euclidean table to verify each remainder step.
- Use the CSV button for spreadsheet review.
- Use the PDF button for a printable report copy.
Frequently Asked Questions
1. What does relatively prime mean?
Two integers are relatively prime when their greatest common divisor equals 1. They do not share any positive factor larger than 1.
2. Do both numbers need to be prime?
No. Composite numbers can still be relatively prime. For example, 8 and 15 are relatively prime because their gcd is 1.
3. Does the checker accept negative integers?
Yes. The gcd test uses absolute values for factorization and the Euclidean method, while preserving signs for the Bézout identity.
4. What happens when one number is zero?
The result depends on the other number. Zero is relatively prime only with 1 or -1, because gcd(0, n) = |n|.
5. Why are Bézout coefficients shown?
They prove the gcd result algebraically. When the gcd is 1, those coefficients also help produce modular inverses.
6. Why might a modular inverse be unavailable?
A modular inverse exists only when the number and modulus are relatively prime and the modulus is greater than 1.
7. Why are prime factors included?
Prime factors make common divisors easy to see. If the two factorizations share no prime factor, the numbers are relatively prime.
8. Is this checker suitable for very large integers?
It works best within standard integer limits on typical hosting. Extremely large values may require arbitrary-precision math extensions.