Numbers $1,2,3, ...., 2016$ arranged in a circle A student wrote numbers $1,2,3, ...., n$ arranged in a circle, then began with erasing number $1$ then he Leaves $2$ then he erased $3$ and leaves $4$ ......
exemple: if $n=10$ :
in the first round he erased $1,3,5,7,9$ , and leaves $2,4,6,8,10$
in the second round he erased $2,6,10$ and leaves $4,8$
in the third round he leaves $4$ because he erased the last number $(10)$ in the second round, then he erased $8$
The last remaining number in the circle is $4$
if $n=2016$ , what is the last remaining number in the circle?
My progress:
In the first round all the odd numbers will be erased $ n=1(\mod2) $
In the second round $ n=2(\mod4) $ will be erased, then $ n=4(\mod8) $....
but in the seventh round we have $ n=0(\mod128) $
 A: It is quite easy to see that if $n$ is a power of two then the last remaining number on the circle is the last one. 
Now, if $n$ is not a power of two then let $k$ be an integer such that $2^{k-1}<n<2^k$. Then $2n-2^k>0$. Consider the following sequence of $2^k$ numbers:
$$0,\ 2n-2^k+1,\ 0,\ 2n-2^k+2,\ \ldots,\ 0,\ n-2,\ 0,\ n-1,\ 0,\ n,\ 1,\ 2,\ 3,\ \ldots,\ 2n-2^k-1,\ 2n-2^k$$ 
and cross them out starting from the first zero on the list. As observed earlier, after all moves $2n-2^k$ will remain on the circle.
Note that after $2^k-n$ steps all zeroes will be crossed out and you will be left with numbers $1,2,\ldots,n$ on a circle and in the next steps you will cross out the numbers just like in the problem statement.
It shows that for arbitrary $n$ the remaining number is $2n-2^k$.
For $n=2016$ we have $k=11$ thus the answer is $2\cdot 2016-2^{11} = 1984$.
A: Let it be that $a_{n}$ is the remaining number if we are dealing
with the numbers $1,2,3,4,5\dots,n$.
If $n$ is sufficiently large then after erasing $1$ and leaving
$2$ we have the numbers $3,4\dots,n,2$ ahead of us.
Comparing this with the situation in which we have the numbers $1,2,3,\dots,n-2,n-1$
ahead of us we conclude that $a_{n}=a_{n-1}+2$ if $a_{n-1}<n-1$
and $a_{n}=2$ otherwise.
So next to the evident $a_1=1$ we have the equality: $$a_{n+1}=\begin{cases}
a_{n}+2 & \text{ if }a_{n}<n\\
2 & \text{otherwise}\end{cases}$$
Looking at sequence $\left(a_{n}\right)$ the following conjecture
arises:
$$a_{n}=2n-2^{\lceil\log_{2}n\rceil}$$
This conjecture can be proved with induction and we conclude: $$a_{2016}=4032-2^{11}=1984$$
