Let n = p^2 * q where p and q are distinct prime numbers. How many numbers m satisfy 1 <= m <= n and gcd(m, n) = 1? Note that gcd(m, n) is the greatest common divisor of m and n. A. p(q-1) B. pq C. (p^2-1)(q-1) D. p(p-1)(q-1)

GATE 2005 · Discrete Mathematics · Number Theory · medium

Answer: The number of m with 1 <= m <= n and gcd(m, n) = 1 is p(p-1)(q-1), which is option D.

  1. Factor n and use multiplicativity of phi: n = p^2 * q with gcd(p^2, q) = 1 (p and q distinct primes). So phi(n) = phi(p^2) * phi(q).
  2. Compute phi(p^2) and phi(q), then multiply: phi(p^2) = p^(2-1)(p-1) = p(p-1). phi(q) = q - 1. Therefore phi(n) = p(p-1) * (q-1) = p(p-1)(q-1). This matches option D.