Given the recurrence relation $$ T_i = T_{i-1} + 2 T_{i-2} + 2^{i - 2} - (i - 2)^2,\quad T_0 = 0,\quad T_1 = 1. $$
I need to solve it. I tried to solve the relation using generating function, but eventually I came to system of linear equations with dimension $6$.
Maybe I have to use another way to solve the relation