Skip to main content
OlympiadHQ

Browse · MathNet

Print

Japan Mathematical Olympiad

Japan number theory

Problem

Determine the number of tuples of integers which satisfy for all and Here the exponential is calculated in order from upper right two numbers.
Solution


First we show the following lemma.

Lemma. Let be integers satisfying , , . Then holds if and only if or is even.

Proof. If , obviously holds. If is even, shows is divisible by . By Fermat's little theorem holds thus . We show the converse. If holds, we can take minimum positive integer satisfying . If then . Assume is not divisible by , then can be written in the form with a non-negative integer and an integer satisfying hence which contradicts to the minimality of . Therefore is divisible by . Similarly is divisible by and shows is even. Hence is even and thus is even. ■

If or then the condition is not satisfied. From here we assume and . Let then , holds. We have two cases; when is odd and when it is even.

When is odd.

Lemma shows if and only if . Since , we have and then lemma shows if and only if is even. Therefore the number of tuples satisfying the condition is .

When is even.

We have then lemma shows . By lemma, holds if and only if or is even. Therefore the number of tuples satisfying the condition is .

Hence the total number of tuples satisfying the condition is .
Final answer
2042 * 19^14

Techniques

Fermat / Euler / Wilson theoremsMultiplicative order