MathDB
A nice cyclic sequence

Source: Balkan MO 2006, Problem 4

April 29, 2006
modular arithmeticfunctionalgebra unsolvedalgebra

Problem Statement

Let mm be a positive integer and {an}n0\{a_n\}_{n\geq 0} be a sequence given by a0=aNa_0 = a \in \mathbb N, and an+1={an2 if an0(mod2),an+m otherwise.  a_{n+1} = \begin{cases} \displaystyle \frac{a_n}2 & \textrm { if } a_n \equiv 0 \pmod 2, \\ a_n + m & \textrm{ otherwise. } \end{cases} Find all values of aa such that the sequence is periodical (starting from the beginning).