Why Is gcd(k, n+k) = 1 Exactly When gcd(k, n) = 1?
At a glance
- 1. Compare divisors
A common divisor of k and n also divides n+k.
- 2. Reverse the argument
A common divisor of k and n+k also divides their difference, n.
- 3. Conclude the identity
The pairs have exactly the same common divisors, so their greatest common divisors are equal.
- 4. Apply coprimality
The gcds are equal, so either one equals 1 exactly when the other does.
The statement follows from a basic fact about greatest common divisors: adding a multiple of one integer to another does not change the gcd. Here, the two pairs and have exactly the same common divisors, so their greatest common divisors are equal—not merely both equal to in the coprime case.
Assume and are integers, and use the standard convention that a gcd is nonnegative. Under the common definition of gcd as the greatest positive common divisor, is undefined; some conventions instead define it as . We exclude under the former convention.
Compare the common divisors
Let be a common divisor of and . Then and , so also divides their sum:
Thus every common divisor of and is also a common divisor of and .
Now reverse the reasoning. If and , then divides the difference:
So every common divisor of and is also a common divisor of and . The two pairs therefore have the same common divisors. In particular, they have the same greatest common divisor:
Deduce the if-and-only-if statement
Two integers are relatively prime (or coprime) when their gcd is . Since the gcds above are equal, they are either both or both different from . Hence
This proves both directions at once. If you want to spell them out separately:
- If , then the gcd identity gives .
- If , the same identity gives .
Worked example
Take and . Then , and
The common divisors are the same in both cases: and . The gcd is not , so neither pair is coprime.
For a coprime example, take and . Then . Since and have no common divisor greater than , the identity gives
You can also check the first gcd directly: , , so the Euclidean algorithm ends at .
A more general version
The same argument works when you add any integer multiple of one number to the other. For integers and ,
Indeed, a divisor of and divides ; conversely, a divisor of and divides . This rule is one of the basic steps in the Euclidean algorithm, which repeatedly replaces a pair of numbers with a pair having the same gcd but smaller entries.
Common mistakes
- Proving only one direction. Showing that common divisors of divide establishes only one inclusion. To prove the gcds are equal, also subtract from to recover .
- Treating the claim as specific to gcd . The stronger result is , regardless of whether that gcd is .
- Assuming positivity is essential. The divisibility argument works for negative integers and for zero as well, as long as the gcd is defined. For example, when .
- Ignoring the undefined pair. Under the convention that is undefined, if , both gcd expressions are undefined, so the stated numerical equality is not applied. Under a convention assigning , the equality also holds for that pair.
The key idea is that addition and subtraction preserve the set of common divisors when the same term is present in both numbers.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.