Suppose $f(n)=3f(\frac{n}{2})+1$ when n is even, and $f(1)=5$, please find $f(2),f(4),f(10),f(14)$ and so on.
I did $f(2)$ and $f(4)$ and answer is 16 and 49. But I am not sure if I am right about $f(10)$. So far I did:
$f(10)=3f(5)+1 = 2(3f(2)+1)+1 = 99.$ My friend got answer 143 and he is also not sure if the answer is correct. Can anyone help me understand how it is done correctly? Please.
$$f(n)=3f\left(\left\lfloor\frac{n}{2}\right\rfloor\right)+1$$
– Apr 29 '15 at 18:54