Finding the nth term in Fibonacci series f(n) = f(n-1) + f(n-2) can be solved in O(n) time by memoization.
A more efficient way would be to find the nth power of matrix [ [1,1] , [1,0] ] using divide and conquer to solve the Fibonacci in log n time.
Is there similar approach which can be followed for f(n) = f(n-1) + f(n-x) + f(n-x+1) [ x is some constant ].
Just be storing previous x elements, this can solved in O(n) time.
Is there a better way to solve this recursion.