I have been trying to solve this recurrence relation for a week, but I haven't come up with a solution.
$$f(n)=5f\left(\frac n2\right)-6f\left(\frac n4\right) + n$$
Solve this recurrence relation for $f(1)=2$ and $f(2)=1$
At first seen it looks like a divide and conquer equation, but the $6f(n/4)$ confuses me.
Please help me find a solution. Kind regards.
You can only define $f(2^k)$. (Try to define $f(3)$. It is impossible.) Hence make the transformation $$ n=2^k, \quad \text{and define}\quad g(k)=f(2^k). $$ Then for $g$ you have that $$ g(0)=2, \quad g(1)=1\quad \text{and}\quad g(k+2)=5g(k+1)-6g(k)+2^{k+2}. $$ If $2^{k+2}$ was not there, then $g$ would have to be of the form $g(k)=c_12^k+c_23^k$. With this additional term the general solution of the recursive relation is of the form $g(k)=c_12^k+c_23^k+c_3k2^k$. Just find the values of the constants.