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\)?
Greatest common divisor · Exercise-GREATEST-COMMON-DIVISOR-009
How many integers \(\displaystyle n\) with \(\displaystyle 1\le n\le100\) satisfy \(\displaystyle \gcd(n,100)=1\)?
Factor \(\displaystyle 100\) into primes.
The gcd is \(\displaystyle 1\) exactly when \(\displaystyle n\) is not a multiple of \(\displaystyle 2\) or of \(\displaystyle 5\).
There are \(\displaystyle 50\) multiples of \(\displaystyle 2\), \(\displaystyle 20\) of \(\displaystyle 5\) and \(\displaystyle 10\) of both, so \(\displaystyle 60\) are excluded.
The remaining ones are \(\displaystyle 100-60=40\). Therefore, there are \(\displaystyle 40\) integers coprime to \(\displaystyle 100\).
40