<s>[INST] The sequence $(a_n)$ is given as $a_1=1, a_{2n} = a_n - 1, a_{2n+1} = a_n + 1$. $a_{2015}=$? The sequence $(a_n)$ is given as  $a_1=1, a_{2n} = a_n - 1, a_{2n+1} = a_n + 1$.
What's the value of $a_{2015}$
Correct answer should be $a_{2015} = 9$. How?
thing that came to mind was to see what $a_{2015}$ is composed of. So $a_{2015} = a_{(2*1007 + 1)} = a_{1007} + 1$ because $a_{2n+1} = a_n + 1$ and
than to work that way down?
My teacher said that I am complicating too much, and I agree, but
what am I missing to solve this?
 [/INST] Actually, you made a mistake breaking down $a_{2015}$. It should be $a_{2015}=a_{2\times 1007+1}=a_{1007}+1$.
And $a_{1007}=a_{2\times503+1}=a_{503}+1$
$a_{503}=a_{2\times 251+1}=a_{251}+1$
$a_{251}=a_{2\times 125+1}=a_{125}+1$
$a_{125}=a_{2\times 62+1}=a_{62}+1$
$a_{62}=a_{2\times 31+1}=a_{31}-1$
$a_{31}=a_{2\times 15+1}=a_{15}+1$
$a_{15}=a_{2\times 7+1}=a_{7}+1$
$a_{7}=a_{2\times 3+1}=a_{3}+1$
$a_{3}=a_{2\times 1+1}=a_{1}+1$
So, $a_{2015}=a_{1}+1+1+1+1+1+1+1+1+1-1=9$
</s>