I have the following recurrence relation which I have obtained from an algorithm:
$$ T(n) = 1 + 2( T(n-2) + T(n-3)+\cdots+T(0) ) $$
with base case $T(0) = 1$ and $ T(1) = 1 $
I would like to be able to compute an analytic formula for this as the inputs for this are too big to just compute it with a for loop (even with keeping track of the computation already made).
I tried drawing the recursion tree but I get stuck.
Ideas? :)
How about this idea:
Since $T(n) = 1 + 2(T(n-2) + T(n-3) + \dots + T(0))$ and $T(n-1) = 1 + 2(T(n-3) + T(n-4) + \dots + T(0))$.
Therefore $T(n) = T(n-1) + 2T(n-2)$.
Can you solve this new recursion?