Problem

Source: Brazilian National Olympiad 2020 3 Level 2

Tags: Powers of 2, 2020, Brazilian Math Olympiad, Brazil



Consider an inifinte sequence $x_1, x_2,\dots$ of positive integers such that, for every integer $n\geq 1$: If $x_n$ is even, $x_{n+1}=\dfrac{x_n}{2}$; If $x_n$ is odd, $x_{n+1}=\dfrac{x_n-1}{2}+2^{k-1}$, where $2^{k-1}\leq x_n<2^k$. Determine the smaller possible value of $x_1$ for which $2020$ is in the sequence.