Skip to main content
OlympiadHQ

Browse · MathNet

Print

Saudi Arabia Mathematical Competitions 2012

Saudi Arabia 2012 number theory

Problem

For a positive integer , let be the number of positive integers less than and relatively prime to (by convention ). Let be the number of positive integers that are divisors of . Find all positive integers such that
Solution
The answer is , , or is any prime number. Let be the set of integers less than and relatively prime to , and let be the set of integers that are positive divisors of . Then We require . By the principle of inclusion-exclusion, . We know , and by , we have . Therefore if and only if , meaning that every positive integer in is either relatively prime to or a divisor of . It is easy to check that this is true for , prime, and . Now suppose is a composite number.

Let be the smallest divisor of greater than . since is not prime. Consider . We have , so must be a divisor of . But for some , so if divides then we have an such that . This gives . This is only possible for , so .

Then since is even, is the smallest divisor of greater than and . Therefore , and this is the only composite number that works.
Final answer
n = 1, n = 4, or n is prime

Techniques

φ (Euler's totient)τ (number of divisors)Greatest common divisors (gcd)Inclusion-exclusionPrime numbers