Problem

Source: China TST 2011 - Quiz 2 - D2 - P2

Tags: induction, number theory unsolved, number theory



Let $\{b_n\}_{n\geq 1}^{\infty}$ be a sequence of positive integers. The sequence $\{a_n\}_{n\geq 1}^{\infty}$ is defined as follows: $a_1$ is a fixed positive integer and \[a_{n+1}=a_n^{b_n}+1 ,\qquad \forall n\geq 1.\] Find all positive integers $m\geq 3$ with the following property: If the sequence $\{a_n\mod m\}_{n\geq 1 }^{\infty}$ is eventually periodic, then there exist positive integers $q,u,v$ with $2\leq q\leq m-1$, such that the sequence $\{b_{v+ut}\mod q\}_{t\geq 1}^{\infty}$ is purely periodic.