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.
Problem
Source: Brazilian National Olympiad 2020 3 Level 2
Tags: Powers of 2, 2020, Brazilian Math Olympiad, Brazil
16.03.2021 10:06
Let $y_n$ is $x_n$ in binary and we can note, that operations are : if $y_n$ ended with zero, then remove this zero If $y_n$ ended with one, then move this one to first position in number So number of "ones" is constant and number on zeroes is decreasing As $2020=11111100100_2$ then not hard to find, that smaller possible value for $x_1$ is $10010011111_2=1183$
13.04.2021 16:01
My/my friend's solution: Firstly: if $x_1=2020$, we have indeed a sequence, so we're looking for sequences with $x_1\le 2020$. Secondly: note that if $x_i=2020$, for some $i \le 2020$, then $x_i=\dfrac{x_{i-1}}{2}$ (but here $x_{i-1}=4040$, impossible) or $x_i=2020=2^k + \dfrac{x_{i-1}-1}{2}$, but note that if $k \le 9$, then $x_{i-1} > 2020$. So $k=10$, then $2(2020-1024)+1=x_{i-1}=1993$, repeating this process we get: $2020 \leftarrow 1993 \leftarrow 1939 \leftarrow 1831 \leftarrow 1615 \leftarrow 1183$, but $1183$ can be achieved by $319$ or $1343$, but if you test those you can see that the next numbers are going to be odd. So we claim that the answer is $1183$. But note that we haven't finished, because we still need to prove that $2020$ can't be achieved by some $A\le 2020$, such that $A$ grows up in some way to $4040$. Testing some initial cases you can see the pattern - if $k$ is such that $2^{k}\le x_j < 2^{k+1}$, for some $j$ such that $x_{j+1}$ is odd, then $x_{j+1}=\dfrac{x_j -1}{2}+2^{k} \le 2^{k+1}$ - in other words, the next therm never achieves the next power of two. If we prove that, then any odd number $\le 2020$ will never pass $2048$, so we will never get $4040$. To prove that $x_{j+1}=\dfrac{x_j -1}{2}+2^{k} \le 2^{k+1}$, we use the fact that $x_j < 2^{k+1} \Leftrightarrow x_j \le 2^{k+1}-1$. Substituting on the first equation, we get that $\dfrac{x_j -1}{2}+2^{k} \le \dfrac{2^{k+1}-1-1}{2}+2^k = 2^k-1+2^k = 2^k - 1 < 2^{k+1}$. Hence, the answer is $1183$. $Q.E.D.$