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

Step-by-step solved exercise: Recurrences and arithmetic

For which value of \(\displaystyle b\) does \(\displaystyle \gcd(20,b)=4\) hold?

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

Step-by-step solution

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

    \[\displaystyle 20=2^2\cdot 5\]
  2. For the gcd to be \(\displaystyle 4=2^2\), \(\displaystyle b\) must be a multiple of \(\displaystyle 4\) and not of \(\displaystyle 5\).

    \[\displaystyle \gcd(20,b)=4 \iff 4\mid b \wedge 5\nmid b\]
  3. Check \(\displaystyle 12\): it is a multiple of \(\displaystyle 4\) and not of \(\displaystyle 5\).

    \[\displaystyle 12=4\cdot 3,\quad 5\nmid 12\]
  4. Therefore, \(\displaystyle \gcd(20,12)=4\).

    \[\displaystyle \gcd(20,12)=4\]

Answer

12

🎯 Build my path to this exercise