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

Step-by-step solved exercise: Recurrences and arithmetic

How many integers \(\displaystyle n\) with \(\displaystyle 1\le n\le100\) satisfy \(\displaystyle \gcd(n,100)=1\)?

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

Step-by-step solution

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

    \[\displaystyle 100=2^2\cdot 5^2\]
  2. The gcd is \(\displaystyle 1\) exactly when \(\displaystyle n\) is not a multiple of \(\displaystyle 2\) or of \(\displaystyle 5\).

    \[\displaystyle \gcd(n,100)=1 \iff 2\nmid n \wedge 5\nmid n\]
  3. There are \(\displaystyle 50\) multiples of \(\displaystyle 2\), \(\displaystyle 20\) of \(\displaystyle 5\) and \(\displaystyle 10\) of both, so \(\displaystyle 60\) are excluded.

    \[\displaystyle 50+20-10=60\]
  4. The remaining ones are \(\displaystyle 100-60=40\). Therefore, there are \(\displaystyle 40\) integers coprime to \(\displaystyle 100\).

    \[\displaystyle 100-60=40\]

Answer

40

🎯 Build my path to this exercise