If n is prime, φ(n) equals

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

If n is prime, φ(n) equals

Explanation:
φ(n) counts how many integers from 1 to n are relatively prime to n. If n is prime, every number from 1 to n−1 shares no common factor with n, so gcd(k, n) = 1 for all k in that range. The only number up to n that isn’t coprime with n is n itself, since gcd(n, n) = n. Therefore there are n−1 integers less than n that are coprime to n, so φ(n) = n−1. This is why the correct value is n−1.

φ(n) counts how many integers from 1 to n are relatively prime to n. If n is prime, every number from 1 to n−1 shares no common factor with n, so gcd(k, n) = 1 for all k in that range. The only number up to n that isn’t coprime with n is n itself, since gcd(n, n) = n. Therefore there are n−1 integers less than n that are coprime to n, so φ(n) = n−1. This is why the correct value is n−1.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy