Problem

Source: Iran MO Third Round 2022 Mid-Terms P4

Tags: recursive, Integer sequence, Periodic sequence, number theory



$a_1,a_2,\ldots$ is a sequence of nonzero integer numbers that for all $n\in\mathbb{N}$, if $a_n=2^\alpha k$ such that $k$ is an odd integer and $\alpha$ is a nonnegative integer then: $a_{n+1}=2^\alpha-k$. Prove that if this sequence is periodic, then for all $n\in\mathbb{N}$ we have: $a_{n+2}=a_n$. (The sequence $a_1,a_2,\ldots$ is periodic iff there exists natural number $d$ that for all $n\in\mathbb{N}$ we have: $a_{n+d}=a_n$)