# Use generating functions to solve nonhomogeneous recurrence relation

The recurrence relation is

$$a_n = a_{n-1} + a_{n-2} + n,\quad n\ge 2$$

with initial conditions $a_0 = 0$ and $a_1 = 1$.

I know I need to convert the recurrence into series and I have broken it down, but am struggling with getting it into a proper form to do partial fractions.

I have:

$$f(x) = a_0 + a_1x + x\sum_{n\ge 2} a_{n-1}x^{n-1} + x^2\sum_{n\ge 2} a_{n-2}x^{n-2} + \frac{1}{(1-x)^2}$$

Any insight/help is much appreciated!