Browse · MathNet
PrintSaudi Arabia booklet 2024
Saudi Arabia 2024 number theory
Problem
Find all odd integer such that the number of integers with and is odd.
Solution
We claim that the only integers that work are prime powers in which or modulo . Let define as function from the set of odd integers to by and Then we want to find such that . It is easy to verify Let which are distinct primes and are integers. Note that does not work so consider .
Lemma: .
Proof: the idea to proof this lemma is similar to prove the Euler totient function. It is easy to check that is indeed the parity of . To remove numbers divisible by some , one can subtract from above the value But that removes numbers divisible by (for ) twice so we will add then continue as the principle of inclusion and exclusion, we add until . Note that the formula should be added and subtracted alternatively but since we consider modulo so all of the signs can be consider as plus. Back to the original problem, by applying the lemma and , one can get From this, one can conclude that Thus if then and if , then , in this case we can check that if and only if or modulo .
Lemma: .
Proof: the idea to proof this lemma is similar to prove the Euler totient function. It is easy to check that is indeed the parity of . To remove numbers divisible by some , one can subtract from above the value But that removes numbers divisible by (for ) twice so we will add then continue as the principle of inclusion and exclusion, we add until . Note that the formula should be added and subtracted alternatively but since we consider modulo so all of the signs can be consider as plus. Back to the original problem, by applying the lemma and , one can get From this, one can conclude that Thus if then and if , then , in this case we can check that if and only if or modulo .
Final answer
All odd integers that are prime powers with the base prime congruent to five or seven modulo eight, i.e., n = p^a with p ≡ 5 or 7 mod 8 and a ≥ 1.
Techniques
Greatest common divisors (gcd)Inclusion-exclusionφ (Euler's totient)