MathDB
Sequence of Rational Numbers

Source: 8th European Mathematical Cup, Junior Category, Q4

December 26, 2019
number theoryrelatively prime

Problem Statement

Let uu be a positive rational number and mm be a positive integer. Define a sequence q1,q2,q3,q_1,q_2,q_3,\dotsc such that q1=uq_1=u and for n2n\geqslant 2: if qn1=ab for some relatively prime positive integers a and b, then qn=a+mbb+1.\text{if }q_{n-1}=\frac{a}{b}\text{ for some relatively prime positive integers }a\text{ and }b, \text{ then }q_n=\frac{a+mb}{b+1}. Determine all positive integers mm such that the sequence q1,q2,q3,q_1,q_2,q_3,\dotsc is eventually periodic for any positive rational number uu.
Remark: A sequence x1,x2,x3,x_1,x_2,x_3,\dotsc is eventually periodic if there are positive integers cc and tt such that xn=xn+tx_n=x_{n+t} for all ncn\geqslant c.
Proposed by Petar Nizié-Nikolac