<s>[INST] Solving Recurrence Relation for Series Solution of an ODE I am trying to solve the below problem:
Assume $y = \sum_{n=0}^{\infty}a_nx^n$ is a solution to $(x-1)y''-(x-3)y'-y=0$. Find $a_n$.
I took both derivatives of $y$, plug them into the equation, modify the indices until each series has the same $x^n$, and take terms out of the series such that they have the same index to bring all the terms under the same summation. I arrive at
$\sum_{n=0}^{\infty}[(n+1)(n)a_n-(n+1)(n+2)a_{n+2} - na_n+3(n+1)a_{n+1}-a_n]x^n + (-2a_2+3a_1-a_0)=0$
Therefore $$a_2 = \frac{3a_1}{2}-\frac{a_0}{2}$$
and
$$a_{n+2} = \frac{(n+3)a_{n+1}-a_n}{(n+2)}, n = 1,2,3...$$
I also find some terms as
$$a_3 = \frac{4a_2}{3}-a_1 = \left(\frac{4\cdot 3}{3\cdot 2} - 1 \right) a_1-\frac{4}{3\cdot 2}a_0$$
$$a_4 = \left(\frac{5\cdot 4\cdot 3}{4\cdot 3\cdot 2} - \frac{13}{8} \right) a_1-\left(\frac{5\cdot 4}{4\cdot 3\cdot 2} - \frac{1}{8} \right)a_0$$
$$a_5 = \left(\frac{6\cdot 5\cdot 4\cdot 3}{5\cdot 4\cdot 3\cdot 2} - \frac{53}{40} \right) a_1-\left(\frac{6\cdot 5\cdot 4}{5\cdot 4\cdot 3\cdot 2} - \frac{17}{60} \right)a_0$$
I can see a pattern for the first set of coefficients, but not the next. For example the first part for $a_1$ is $a_n = \frac{n+1}{2}$
Any help would be greatly appreciated. Thanks!
 [/INST] After Leucippus's answer.
Since Leucippus identified the proper sequences, if
$$a_{n+2} = \frac{(n+3) \, a_{n+1} - a_{n}}{n+2}$$ the coefficients can write
$$a_n=(2 a_0 -a_1) +e \,(a_1 -a_0 )\, \frac{\Gamma (n+1,1)}{n!}$$ where appears the incomplete gamma function.
</s>