Problem:
For a positive integer , let be all the positive integers smaller than that are coprime to . Find all such that
for all .
Here is the largest positive integer that divides both and . Integers and are coprime if .
Problem 1702
Official solutions — 2
Solution 1
Solution:
The answer is all even integers and all powers of . First we show that these work.
- When is even, all are odd, and so for every .
- When is a power of , the are exactly the numbers in the range that are not divisible by . So, the sequence alternates between numbers congruent to (mod ) and (mod ). Thus for every .
Now we show that no other positive integer works. For the sake of contradiction, consider an odd candidate that is not a power of , and suppose it satisfies the problem condition. Then, since and , we have , so . Thus, we can write as , where and . We have (as by assumption) and .
We now split into two cases based on modulo .
Case 1. (mod ).
As and , neither nor are in the sequence . As is odd and (mod ), and are congruent to (mod ), are coprime to , and are smaller than . Thus, both and are in the sequence, and they are consecutive terms. However, this means . This gives a contradiction, as both and are coprime to .
Case 2. (mod ).
This case is similar to Case 1. Neither nor are in the sequence, but and are. We obtain a similar contradiction from .
Solution 2
Solution:
We give an alternative way to show that any odd has to be the power of . Suppose for contradiction that has at least distinct prime factors. Choose integers such that
- and are coprime;
- Every prime divisor of divides .
We use the Chinese Remainder Theorem, to find an integer such that
We claim that there is an index such that and . Indeed, we note the following:
- is consecutive to a multiple of , so . In a similar way we get that .
- is away from a multiple of , therefore as , . In a similar way we get that .
- and as .
This implies that and are coprime with , whereas neither nor are coprime with , which proves our claim. Finally, we claim that is coprime with . Indeed we have and . This implies that is a prime power.
When is odd, since and , we have , so , which implies that is necessarily a power of . This concludes our proof.