Problem 2
For which pairs of positive integers is the sequence , , eventually constant?
Step 3 of 5: The modulus divides one term exactly
In plain words
Multiplying by produces plus , and Euler's theorem makes congruent to modulo , so this product is a multiple of ; the same works for the other side, forcing to divide their gcd.
Detailed analysis
Since and , Euler's theorem gives . Then , and since this gives . Symmetrically gives , so . Hence .