Problem:
For positive integers , is defined as follows: , and if .
Find the smallest positive integer for which there exists a positive integer such that .
Problem:
For positive integers , is defined as follows: , and if .
Find the smallest positive integer for which there exists a positive integer such that .
Solution:
We see that the smallest such must be a prime power, because if two numbers are distinct mod , they must be distinct mod at least one of the prime powers that divide . For , if and are distinct , then and must be distinct . In fact they need to be distinct if and because then there are no primitive roots mod .
Using this, for we find the smallest prime such that there exists such that and are distinct . The list is: . We can easily check that the next largest prime for is , and also any prime power other than for which and are distinct is also larger than .
Now if and are distinct , then must be a multiple of or something that is either or at least . It is easy to see that is the smallest prime that satisfies this.
If is a prime power less than such that and are distinct , then the prime can be at most and clearly this doesn't work because .
To show that works, choose so that is a primitive root and . This is possible by the Chinese Remainder theorem, and it is easy to see that this works by induction.