Consider a sequence of positive integers $a_1, a_2, a_3, . . .$ such that for $k \geq 2$ we have $a_{k+1} =\frac{a_k + a_{k-1}}{2015^i},$ where $2015^i$ is the maximal power of $2015$ that divides $a_k + a_{k-1}.$ Prove that if this sequence is periodic then its period is divisible by $3.$
An odd but interesting problem I feel so frustrated that I couldn't solve it in the competition. The solution is, I believe, the official one but I cannot quote the source:
First we note that the period of the sequence does not change if we divide each member by $2^k$ such that $2^k\|gcd(a_1,a_2, ...)$ (since the recurrence relation is homogeneous with respect to divisibility by 2) to obtain a new sequence $b_n=\frac{a_n}{2^k}$.
At least one of the members of $b_n$ is odd. Say it is $b_m$ hence $b_m\equiv 1 \pmod{2}$. We consider the following cases:
1) $b_{m+1}\equiv 1 \pmod{2}$ then $b_{m+2}\equiv0\pmod{2}$ and $b_n\equiv b_{n+3} \pmod{2}$. Hence, the sequence is periodic modulo 2 with period 3 so the period of $a_n$ is divisible by 3.
2) $b_{m+1}\equiv 0 \pmod{2}$. Similarly to 1) the period of $a_n$ is again divisible by 3.
By similarly considering the sequence modulo 3 we can find that the period is also divisible by 9