MathLabs

Problem 2

For which pairs of positive integers (a,b)(a,b) is the sequence gcd⁡(an+b,bn+a)\gcd(a^n+b,b^n+a), n=1,2,…n=1,2,\ldots, eventually constant?
Step 5 of 5: Finish using xn+1x_{n+1}
In plain words

Repeating the same argument one step later shows an+1+ba^{n+1}+b is congruent to a+ba+b modulo MM, and since aa and bb are both −1-1 modulo MM, this quantity is −2-2, which forces MM to be at most 22, leaving only the trivial pair.

M∣2  ⟹  a=b=1M\mid2\implies a=b=1
Detailed analysis

Since xn+1=xnx_{n+1}=x_n, also M∣an+1+bM\mid a^{n+1}+b. Now an+1=an⋅a≡1⋅a≡a≡−1(modM)a^{n+1}=a^n\cdot a\equiv1\cdot a\equiv a\equiv-1\pmod M (Step 4), so an+1+b≡−1+b≡−1−1=−2(modM)a^{n+1}+b\equiv-1+b\equiv-1-1=-2\pmod M, forcing M∣2M\mid2. Since M=ab+1≥2M=ab+1\ge2 for positive integers a,ba,b, this gives M=2M=2, i.e. ab=1ab=1, so a=b=1a=b=1. Together with Step 1, the only pair for which the sequence is eventually constant is (a,b)=(1,1)(a,b)=(1,1).