Greatest common divisor · Exercise-GREATEST-COMMON-DIVISOR-005

Step-by-step solved exercise: Recurrences and arithmetic

Compute \(\displaystyle \gcd(84,126)\).

Step by step with comments, a check and common mistakes.

Step-by-step solution

  1. Factor \(\displaystyle 84\) into primes.

    \[\displaystyle 84=2^2\cdot 3\cdot 7\]
  2. Factor \(\displaystyle 126\) into primes.

    \[\displaystyle 126=2\cdot 3^2\cdot 7\]
  3. The common primes are \(\displaystyle 2\), \(\displaystyle 3\) and \(\displaystyle 7\). Take the smaller exponent of each.

    \[\displaystyle \min(2,1)=1,\quad \min(1,2)=1,\quad \min(1,1)=1\]
  4. Multiply. Therefore, \(\displaystyle \gcd(84,126)=42\).

    \[\displaystyle \gcd(84,126)=2\cdot 3\cdot 7=42\]

Answer

42

🎯 Build my path to this exercise