Recurrence with floor function

208 Views Asked by At

Solve the recurrence relation$$a_n=a_{\lfloor{\frac{n}{2}\rfloor}}+n$$with $a_1=1$.

I am interested in the recurrence above. I tried taking two case, one with $n$ even and other with odd to avoid the floor function. But that gave me two recurrences which I am not able to solve. Any help will be highly appreciated.