Let
yk=xk+12xk−1. From the recurrence,
2xk+1−1=3xk(2xk−1)(xk−2) and
xk+1+1=3xk(xk+1)2, so
yk+1=(xk+1)2(2xk−1)(xk−2)=yk(yk−1)=yk2−yk, since
yk−1=xk+1xk−2. Here
y1=11361139=1213. By induction
yk=122k−1ck where
c1=13 and
ck+1=ck(ck−122k−1); since
122k−1 is divisible by
6, every
ck stays coprime to
6.
Inverting the substitution,
xk=2−yk1+yk=2d−cd+c with
d=122k−1 and
c=ck. All
xk are positive (for
x>0, x+x1−1≥1), so
yk=xk+12xk−1∈(−1,2), making both
d+c and
2d−c positive. Any common divisor of
d+c and
2d−c divides their combinations
3d and
3c; as
gcd(c,d)=1, it divides
3, but
d is divisible by
3 while
c is not, so
d+c is not divisible by
3. Hence the fraction is in lowest terms and
m+n=3d=3⋅1222024.
Modulo
8, 1222024≡0. Modulo
125, the multiplicative order of
12 divides
λ(125)=100, and
22024≡16(mod100) (it is
0 mod
4, and
220≡1 mod
25 with
2024≡4 mod
20), so
1222024≡1216≡41(mod125). The Chinese remainder theorem gives
1222024≡416(mod1000), so
m+n≡3⋅416 =1248≡248(mod1000).