Which expression gives φ(n) when n is the product of two distinct primes p and q?

Boost your GATE General Aptitude and CS Exam readiness with our dynamic quiz. Test your skills with comprehensive questions featuring hints and detailed solutions. Ace your GATE exam confidently!

Multiple Choice

Which expression gives φ(n) when n is the product of two distinct primes p and q?

Explanation:
φ(n) counts numbers up to n that are relatively prime to n. For n = pq with distinct primes p and q, the numbers not coprime to pq are exactly the multiples of p or of q. There are q multiples of p up to pq and p multiples of q up to pq, with one overlap at pq itself, so non-coprime count is p + q − 1. Thus φ(pq) = pq − (p + q − 1) = (p − 1)(q − 1). This also follows from multiplicativity: φ(pq) = φ(p)φ(q) = (p − 1)(q − 1).

φ(n) counts numbers up to n that are relatively prime to n. For n = pq with distinct primes p and q, the numbers not coprime to pq are exactly the multiples of p or of q. There are q multiples of p up to pq and p multiples of q up to pq, with one overlap at pq itself, so non-coprime count is p + q − 1. Thus φ(pq) = pq − (p + q − 1) = (p − 1)(q − 1). This also follows from multiplicativity: φ(pq) = φ(p)φ(q) = (p − 1)(q − 1).

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy