Skip to main content
Ir al calculador
Advertisement

Última actualización: 19 de agosto de 2026

Números Coprimos Calculadora

Quick Answer

Two integers are relatively prime when their greatest common divisor is 1. This calculator tests that condition, reports the gcd and lcm, and explains whether the pair shares any factor larger than 1 so the answer can be checked quickly.

Two numbers are relatively prime if and only if their greatest common divisor is 1.

Puntos Clave

  • Two integers are relatively prime when their gcd is 1.
  • The numbers do not have to be prime individually.
  • Prime factorization can show why the pair is or is not coprime.
  • Even numbers cannot be relatively prime to each other.
  • The gcd output is the most important supporting check.
Útil
No útil
Guardar como imagen
Compartir
Incrustar
Citar
Escribir comentario

Fórmula

Two integers are relatively prime when gcd(a, b) = 1

Donde:

  • a=First integer
  • b=Second integer
  • gcd(a,b)=Greatest common divisor
Relatively Prime CalculatorDiagram showing two numbers with separate prime factors and gcd equal to 1.Relatively Prime82 × 2 × 2153 × 5Key testgcd(a, b) = 1
Two integers are relatively prime when they share no factor larger than 1.

Ejemplos resueltos

8 and 15 are coprime

These numbers share no factor larger than 1.

  1. 1Factor the numbers: 8 = 2 × 2 × 2 and 15 = 3 × 5.
  2. 2No prime factor appears in both lists.
  3. 3Therefore gcd(8, 15) = 1, so the numbers are relatively prime.
Respuesta Final: coprimeStatus = Yes, gcd = 1, lcm = 120

14 and 21 are not coprime

A shared factor larger than 1 breaks the coprime condition.

  1. 1Compute the gcd: gcd(14, 21) = 7.
  2. 2Because the gcd is not 1, the numbers are not relatively prime.
  3. 3The least common multiple is 42.
Respuesta Final: coprimeStatus = No, gcd = 7, lcm = 42

35 and 64 are coprime

One number can be composite and still be coprime with another.

  1. 1Prime factors of 35 are 5 and 7.
  2. 2Prime factors of 64 are only 2s.
  3. 3Since no prime factor is shared, gcd(35, 64) = 1.
Respuesta Final: coprimeStatus = Yes, gcd = 1, lcm = 2240

Introducción

The Relatively Prime Calculator tells you whether two whole numbers are coprime, meaning their greatest common divisor is exactly 1. This idea appears throughout elementary number theory, fraction simplification, modular arithmetic, and cryptography. The calculator does more than print yes or no: it also shows the gcd, the least common multiple, and a short note about shared factors so you can verify the result quickly and understand why the pair is or is not relatively prime.

What relatively prime means

Two integers are relatively prime when they do not share any common factor other than 1. The numbers themselves do not have to be prime; they only need to avoid sharing a larger divisor.

  • Coprime and relatively prime mean the same thing.

  • Composite numbers can still be coprime with each other.

  • The gcd test is the fastest check.

  • Shared factors larger than 1 make the answer no.

The gcd rule

The key test is gcd(a, b) = 1. If the greatest common divisor is 1, the pair is relatively prime. If the gcd is 2, 3, 7, or any larger integer, the pair is not relatively prime.

  • Compute the gcd first.

  • A gcd of 1 means yes.

  • A gcd larger than 1 means no.

  • The least common multiple often helps as a follow-up value.

Worked example

Consider 14 and 21. Since 14 = 2 × 7 and 21 = 3 × 7, both numbers share the factor 7. That makes the gcd equal to 7, so the pair is not relatively prime.

  • List factors or use the Euclidean algorithm.

  • Look for the largest shared divisor.

  • Stop once the gcd is known.

  • Interpret the answer as a property of the pair, not each number alone.

Inputs and outputs

The calculator expects two positive integers. It then reports whether they are relatively prime, what their gcd is, what their least common multiple is, and a short note explaining whether a shared factor exists.

  • Only whole numbers belong in this calculator.

  • The yes/no result is the main answer.

  • The gcd explains why the answer is yes or no.

  • The lcm is useful for related fraction and divisibility work.

Common mistakes

A frequent mistake is assuming at least one number must be prime. Another is confusing “both numbers are prime” with “the pair is relatively prime,” which are related ideas but not the same statement.

  • Coprime numbers do not have to be prime.

  • Two even numbers can never be relatively prime.

  • A shared factor of 1 does not mean the numbers are identical.

  • Zero is usually excluded in introductory coprime problems.

Where this idea is used

Coprime pairs appear in fraction reduction, modular arithmetic, gear ratios, rhythm cycles, and cryptography. Even when the numbers are small, the concept explains why some arithmetic shortcuts or inverses work and others do not.

  • Reducing fractions to lowest terms.

  • Testing whether a modular inverse exists.

  • Analyzing repeating cycles and patterns.

  • Building intuition for number-theory proofs.

Manual method versus calculator use

Small numbers are easy to test by hand with factors or the Euclidean algorithm, but a calculator speeds up repeated checks. It is still valuable to estimate whether the pair likely shares an obvious factor such as 2, 3, 5, or 7 before using the tool.

  • Check parity and small divisors first.

  • Use prime factors when the numbers are modest.

  • Use the calculator for quick verification.

  • Read the gcd output to confirm the yes/no result.

Tarjeta de Referencia Rápida

Relatively prime quick reference

Referencia rápidaNúmeros Coprimos Calculadora

gcd(a, b) = 1

Rango válido: Use positive integers only.

Valores Comunes

8 and 15Yes, gcd = 1
14 and 21No, gcd = 7
35 and 64Yes, gcd = 1
Consecutive integersAlways coprime

Cuidado

  • Do not confuse prime numbers with relatively prime pairs.
  • Do not enter decimals or fractions.
  • Do not ignore an obvious shared factor such as 2 or 5.
  • Do not treat gcd 1 and lcm 1 as the same statement.

Consejos Pro

  • Check small shared divisors first.
  • Use the Euclidean algorithm for hand work.
  • Read the gcd before reading the lcm.
  • Remember that composite numbers can still be coprime.

Preguntas Frecuentes

What does relatively prime mean?

It means two integers have no common factor greater than 1, so their gcd is 1.

Do both numbers have to be prime?

No. Composite numbers such as 8 and 15 can still be relatively prime.

What is the quickest way to check?

Compute the greatest common divisor. If it equals 1, the numbers are relatively prime.

Can two even numbers be relatively prime?

No, because both even numbers are divisible by 2, so their gcd is at least 2.

Why does the calculator also show the lcm?

The least common multiple is a useful companion value in fraction and divisibility problems.

Can consecutive integers be relatively prime?

Yes. Any two consecutive integers always have gcd 1.

Why are 1 and any positive integer relatively prime?

Because the only positive divisor of 1 is 1 itself, so the gcd with any positive integer is 1.