Recurrence relation $a_{n} = 2n(a_{n-1} + 3^n(n!)$, $ a_{0} = 1$ I am facing a problem with solving this recurrence relations. 
$a_{n} = 2n(a_{n-1} + 3^n(n!))$,  $ a_{0} = 1$
This is what I got so far. 
$a_{n}^c = 2n(a_{n-1}^c = 2n(2(n-1)a_{n-2}^c = 2^2(n)(n-1)a_{n-2}^c = 2^2 n(n-1)(2(n-2)a_{n-3}) = 2^3 n(n-1)(n-2) = .... 2^n(n!)(a_{0}^c) = c_{1}2^n n!$   
 A: Consider making use of the exponential generating function
$$
\sum_{n=0}^\infty a_n \frac{x^n}{n!}.
$$
Multiply your relation with $x^n/n!$ and sum over all $n \geq 1$:
$$
\sum_{n=1}^\infty a_n \frac{x^n}{n!} = \left(\sum_{n=1}^\infty 2na_{n-1}\frac{x^n}{n!} + \sum_{n=1}^\infty 2n3^nn! \frac{x^n}{n!}\right)\\
= 2x\sum_{n=1}^\infty a_{n-1} \frac{x^{n-1}}{(n-1)!} + 2\sum_{n=1}^\infty n(3x)^n \\
= 2x\sum_{n=1}^\infty a_n \frac{x^n}{n!} + 2x + \frac{6x}{(1-3x)^2}.
$$
Note that we made use of the initial condition $a_0 = 1$ in the above. Rearranging the terms we get that
$$
\sum_{n=1}^\infty a_n\frac{x^n}{n!} = \frac{2x}{1-2x} + \frac{6x}{(1-2x)(1-3x)^2}
$$
Using partial fractions we may write
$$
\frac{6x}{(1-2x)(1-3x)^2} = 6x\left(\frac{3}{(1-3x)^2} + \frac{4}{1-2x}- \frac{6}{1-3x}\right) \\
= 6\sum_{n=0}^\infty n 3^nx^n + 24x\sum_{n=0}^\infty2^nx^n - 36x\sum_{n=0}^\infty3^nx^n \\
= \sum_{n=1}^\infty 6(3^n(n-2)+2^{n+1})x^n.
$$
The other terms is 
$$
\frac{2x}{1-2x} = 2x\sum_{n=0}^\infty 2^nx^n = \sum_{n=0}^\infty 2^{n+1}x^{n+1} = \sum_{n=1}^\infty 2^n x^n
$$
Collecting everything we finally get that
$$
a_n = n!\left(13\cdot2^n + 2\cdot3^{n+1}(n-2)\right)
$$
