Tribonacci, three-way recursion but still linear
The Tribonacci sequence sums the previous three terms:
T(n) = T(n-1) + T(n-2) + T(n-3), T(0) = 0, T(1) = 1, T(2) = 1
so it runs
Why is the naive recursion even worse than Fibonacci here, and how do you get it to ?
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.