Skip to main content
OlympiadHQ

Browse · MathNet

Print

The 35th Japanese Mathematical Olympiad

Japan number theory

Problem

Let . How many functions satisfy the following condition: For any elements , if is divisible by , then is also divisible by ?
Solution


In this solution, always means that is divisible by . Furthermore, for any integer , we denote by the unique element satisfying . Note that for any integers and , we have and .

Under this notation, the condition in the problem can be rewritten as for any elements . We denote this equation by .

Define . For any elements and in , note that

First, consider the case where contains a multiple of . Let be such an element. Then, since , there exists some such that . Therefore, we have for any since gives Furthermore, is a multiple of since gives Conversely, suppose that for every , we have and is a multiple of . Then such satisfies the condition because for any , both sides of are divisible by .

Since contains , the condition that is a multiple of for all is equivalent to being one of , , , or . Furthermore, the condition that for all is equivalent to saying that for all . In the following, we consider each of the four possible cases for and count the number of possible functions in each case.

When , there is only one function , namely for all . When , the number of such functions is the number of ways to assign or for each , such that there is at least one with . There is exactly one way to assign all values to , so the number of valid functions is . When , by the same reason, the number of such functions is also . When , the number of such functions is the number of ways to assign , or for each such that there is at least one with and at least one with . There are ways where for all , and ways where for all , and one way where for all . So the number of valid functions in this case is .



Next, we consider the case where does not contain any multiples of . Since is nonempty, we can take an element of . Because is not divisible by , Euler's theorem gives , so we have . Thus, there exists some such that . Therefore, we have since gives Furthermore, for any , from and , we obtain Thus, we have Since is not divisible by , we conclude that holds for every . Therefore, the set has exactly one element. Since , we must have , which does not contain a multiple of . The constant function is the only function with this property. Conversely, this function satisfies the condition because both sides of equal for any .

Hence, the total number of possible functions is .
Final answer
858

Techniques

Fermat / Euler / Wilson theoremsInclusion-exclusionFunctional Equations