Solve $a_n=n(a_{n-1}+a_{n-2})$ where $a_0=1,a_1=2$ using generating functions I am trying to solve a recurrence relation,$a_n=n(a_{n-1}+a_{n-2})$ where $a_0=1,a_1=2$, using generating functions. So, I did: let $$A(x)=\sum_{n\geq 0}a_n\frac{x^{n}}{n!}$$
$$\sum_{n\geq 0}a_{n+2}\frac{x^{n+2}}{(n+2)!}=\sum_{n\geq 0}a_{n+1}\frac{x^{n+2}}{(n+1)!}+\sum_{n\geq 0}a_n\frac{x^{n+2}}{(n+1)!}$$
$$[A(x)-a_1x-a_0]=\frac{[A(x)-a_0]}{x}+\frac{A(x)x^2}{(n+1)}$$
However, $$\sum_{n\geq 0}a_n\frac{x^{n+2}}{(n+1)!}=\frac{A(x)x^2}{(n+1)}$$ does not allow me make process further, so I need help to find $A(x)$.
Note that the answer should be $a_n=(n+1)!$. However, I want to arrive at it using only generating functions not differential equations or linear algebra techniques.
Edit: I saw that I made a silly mistake in $$\sum_{n\geq 0}a_n\frac{x^{n+2}}{(n+1)!}=\frac{A(x)x^2}{(n+1)}$$ Do you have any suggestion to write $\sum_{n\geq 0}a_n\frac{x^{n+2}}{(n+1)!}$ in terms of $A(x)=\sum_{n\geq 0}a_n\frac{x^{n}}{n!}$ ?
Original question: Formula for $a_n$ where $a_n$ = n*($a_{n-1}$+$a_{n-2}$)

A standard way to do this does end up with a differential equation.
Define
$$
A(x) := \sum_{n=0}^\infty a_n \frac{x^n}{n!}
$$
We need similar sums with $na_{n-1}$ and $na_{n-2}$.
Compute
$$
\sum_{n=1}^\infty n a_{n-1} \frac{x^n}{n!} 
= \sum_{n=1}^\infty a_{n-1}\frac{x^n}{(n-1)!}
= \sum_{n=0}^\infty a_n\frac{x^{n+1}}{n!}
= x\sum_{n=0}^\infty a_n\frac{x^{n}}{n!}
=xA(x)
$$
Next
\begin{align}
\sum_{n=2}^\infty n a_{n-2}\frac{x^n}{n!}
&=\sum_{n=2}^\infty a_{n-2}\frac{x^n}{(n-1)!}
=x\sum_{n=2}^\infty \frac{a_{n-2}}{n-1}\frac{x^{n-1}}{(n-2)!}
\\&
=x\sum_{n=0}^\infty \frac{a_{n}}{n+1}\frac{x^{n+1}}{n!}
=x \int_0^x \sum_{n=0}^\infty a_n\frac{t^n}{n!}\;dt = x\int_0^x A(t)\;dt
\end{align}
Now the recurrence equation $a_n = n(a_{n-1}+a_{n-2})$ yields
\begin{align}
0 &= \sum_{n=2}^\infty \big(a_n - na_{n-1}-na_{n-2}\big)\frac{x^n}{n!}
\\
&=\sum_{n=2}^\infty a_n \frac{x^n}{n!}
-\sum_{n=2}^\infty na_{n-1}\frac{x^n}{n!}
-\sum_{n=2}^\infty na_{n-2}\frac{x^n}{n!}
\\ &=
\left(-a_0-a_1x+\sum_{n=0}^\infty a_n \frac{x^n}{n!}\right)
-\left(-a_0 x+\sum_{n=1}^\infty na_{n-1}\frac{x^n}{n!}\right)
-\left(\sum_{n=2}^\infty na_{n-2}\frac{x^n}{n!}\right)
\\ &=
\big(-1-2x+A(x)\big) - \big(-x+xA(x)\big) - \left(x\int_0^x A(t)\;dt\right)
\end{align}
We need to solve this integral equation.  Since I know much more about differential equations, let's consider this a differential equation for $F(x) := \int_0^x A(t)\,dt$.
\begin{align}
0 &= \big(-1-2x+F'(x)\big) - \big(-x+xF'(x)\big) - \big(xF(x)\big)
\\\implies
(1-x)F'(x) - xF(x) &= x+1
\end{align}
with initial condition $F(0) = 0$.  We get solution $F(x) = \frac{x}{x-1}$,
so $A(x) = F'(x) = \frac{1}{(1-x)^2}$.
Finally, compute the Taylor series for this:
$$
\frac{1}{(1-x)^2} = 1+2x+3x^2+4x^3+\cdots = \sum_{n=0}^\infty (n+1)x^n
$$
To find the formula for $a_n$, reason like this:
$$
\sum_{n=0}^\infty a_n \frac{x^n}{n!} = \sum_{n=0}^\infty (n+1)x^n
\\
a_n \frac{1}{n!} = (n+1)
\\
a_n = (n+1)n! = (n+1)!
$$
