MathLabs

Problem 3

A sequence of real numbers a0,a1,…a_0,a_1,\ldots is said to be good if: (i) a0a_0 is a positive integer; (ii) for each non-negative integer ii, ai+1=2ai+1a_{i+1}=2a_i+1 or ai+1=aiai+2a_{i+1}=\frac{a_i}{a_i+2}; (iii) there exists a positive integer kk such that ak=2014a_k=2014. Find the smallest positive integer nn such that there exists a good sequence with an=2014a_n=2014.
Step 3 of 4: Use the modular invariant
(mi,ni)≡(−2i,2i)(mod2015)(m_i,n_i)\equiv(-2^i,2^i)\pmod{2015}
Detailed analysis

The two inverse updates preserve the displayed congruence by induction. Since a_0 must be an integer and the fraction is reduced, its denominator is one. Thus 2^k is congruent to one modulo 2015.