Problem

Source: Baltic Way 2014, Problem 20

Tags: modular arithmetic, number theory proposed, number theory



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.$