Let $a_n$ be the sequence with the following recursive definition: $a_1=0$, $a_n=a_{\lfloor \frac{n}{2} \rfloor}+1$.
I'm asked to find the first few values of $a_n$. And they are $0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,...$.
Now I'm asked to find an explicit formula for $a_n$. It says (Hint: first consider the values for $a_n$ when $n$ is a power of $2$). So here's what I got $a_n=\lfloor \log_2 n \rfloor$.