Problem

Source: Turkey EGMO TST 2016 P5

Tags: combinatorics, Periodic sequence, Turkey, algebra, Sequence



A sequence $a_1, a_2, \ldots $ consisting of $1$'s and $0$'s satisfies for all $k>2016$ that \[ a_k=0 \quad \Longleftrightarrow \quad a_{k-1}+a_{k-2}+\cdots+a_{k-2016}>23. \]Prove that there exist positive integers $N$ and $T$ such that $a_k=a_{k+T}$ for all $k>N$.