Solving a summation involving floor function

49 Views Asked by At

How to obtain the exact solution for the following Summation: $$ C(N) = 3^{\left\lfloor \log_3 \left(\frac{N}{4}\right)\right\rfloor + 1} + \sum_{k=0}^{\left\lfloor \log_3 \left(\frac{N}{4}\right)\right\rfloor} \left\lfloor \frac{N}{3^k}\right\rfloor 3^k$$

I know that the approximate solution to this is $\sim N \log_{3}(N)$. But I am not sure how to approach this. This showed up as a result of the trying to solve the following the recurrence: $$C(N) = C\left({\left\lfloor {N \over 3} \right\rfloor}\right) + N \quad{\rm for}\ N>3{\rm \ with\ } C(1)=C(2)=C(3)=1$$