So I have found the following through a series of differential equations and exponential generating functions: $[\displaystyle\frac{x^n}{n!}](\displaystyle\frac{1}{2}x^2 + x + 1)e^x$.
I got this in the following way: $$A(x)=\sum_{n=0}^\infty a_n\frac{x^n}{n!}\ .$$ Then $$\eqalign{A(x) &=1+\sum_{n=1}^\infty(a_{n-1}+n)\frac{x^n}{n!}\cr &=1+\sum_{n=1}^\infty \frac{x^n}{(n-1)!} +\sum_{n=0}^\infty a_n\frac{x^{n+1}}{(n+1)!}\cr &=1+xe^x+\sum_{n=0}^\infty a_n\frac{x^{n+1}}{(n+1)!}\ .\cr}$$ Differentiating both sides leads to the differential equation $$\frac{dA}{dx}-A=(x+1)e^x\ ,$$ and solving with the initial condition $A(0)=1$ gives $$A=(1+x+\tfrac12x^2)e^x\ .$$
My question is, how do I extract the coefficient of $\displaystyle\frac{x^n}{n!}$?
As much as a pain it might be, a detailed explanation would be greatly appreciated. This is simply something I would like to thoroughly understand.
Note that $e^x$ itself represents a power series in $x$. So
$$(1 + x + \frac{1}{2}x^2)e^x = 1 \cdot \sum_{n=0}^{\infty} \dfrac{x^n}{n!} + x \cdot \sum_{n=0}^{\infty} \dfrac{x^n}{n!} + \frac{1}{2}x^2 \cdot \sum_{n=0}^{\infty} \dfrac{x^n}{n!}$$
What's the coefficient of $x^n$ in this series? Well, it's the sum of the coefficients of $x^n$ in each of the three series. For example, the coefficient of $x^6$ will be $\dfrac{1}{6!} + \dfrac{1}{5!} + \dfrac{1}{2 \cdot 4!}$