I have the following formula I am looking to find an explicit formula for the coefficient $ a_n $: here $ a_0 = 1; a_1 = 2 $ for $n\geq2$
$$ a_n = n(a_{n-1} + a_{n-2}) $$
define the exponential generating function:
$$f(x) = \sum_{n\geq0}a_n\frac{x^n}{n!} $$
multiplying by $ \frac{x^n}{n!}$ and summing over the value for n we get:
$$ \sum_{n\geq2}a_n\frac{x^n}{n!} = \sum_{n\geq2}na_{n-1}\frac{x^n}{n!} + \sum_{n\geq2}na_{n-2}\frac{x^n}{n!} $$
this gives:
$$f(x) - 2x - 1 = xf(x) + x^2 \sum_{n\geq2}a_{n-2}\frac{x^{n-2}}{(n-1)!} $$
I have kind of hit a dead end here, how do I make the last term on the RHS to make sense? Any help would be appreciated.
If you don’t see anything better, it doesn’t hurt to gather some data by computing the first few terms $a_n$:
$$\begin{array}{c|cc} n&0&1&2&3&4&5\\\hline a_n&1&2&6&24&120&720 \end{array}$$
This strongly suggests the conjecture that $a_n=(n+1)!$. Try it: for $n\ge 0$ let $b_n=(n+1)!$. Then $b_0=1=a_0$, $b_1=2=a_1$, and
$$n(b_{n-1}+b_{n-2})=n\big(n!+(n-1)!\big)=n(n+1)(n-1)!=(n+1)!=b_n\;,$$
so by induction $a_n=b_n=(n+1)!$ for all $n\ge 0$.