I saw this question about solving recurrences in O(log n) time with matrix power: Solving a Fibonacci like recurrence in log n time
The recurrence relations in this question are homogeneous.
Is there a matrix for non-homogeneous linear recurrence relations?
My recurrence is:
a(n) = a(n-1) + a(n-2) + 1, where a(0) = 1 and (1) = 1
The "plus one" makes the linear recurrence relation a non-homogeneous one.
If there is no matrix for this kind of linear recurrence relation, how can I compute a(n) in O(log n) time?