Exercise · ZW-GREATEST-COMMON-DIVISOR-010 · ★★★ Advanced

If \(\gcd(a,b)=1\), what values can \(\gcd(a+b,\,a-b)\) take for \(a\ne b\)?

Choose one option.

Show answer
  • D. Only 1 or 2

Explanation

A common divisor \(d\) divides the sum \(2a\) and the difference \(2b\), so \(d\mid 2\gcd(a,b)=2\). It is 2 when \(a,b\) are both odd (3 and 1: \(\gcd(4,2)=2\)) and 1 otherwise (2 and 1: \(\gcd(3,1)=1\)).

Study Discrete mathematics in ZWMath →

Review the concept: Greatest common divisor

The greatest common divisor \(\gcd(a,b)\) of two integers \(a\) and \(b\), not both zero, is the largest integer that divides both.

\[\gcd(a,b)=\max\{d\in\mathbb{Z}:\ d\mid a,\ d\mid b\}\]

More practice problems: greatest common divisor

← ZW-GREATEST-COMMON-DIVISOR-009