Optimize a linear recurrence
As Bartek commented, you are missing a base case. You can compute large values of $T$ in several ways:


Bartek's suggestion: Use an array to store all the entries computed so far.
You can optimize the previous method, dramatically reducing the memory needed: store only the last $4$ entries of the array at each point in time.
Use matrix powering. There are vectors $x,y$ and a matrix $A$ such that $T[N] = x'A^N y$. This approach is very similar to the previous one.
Find an explicit solution to your recurrence $T[N] = \sum_{i=1}^4 c_i \lambda_i^n$ (there are other possible forms, but this is the most probable), and use this formula to calculate $T[N]$ directly.