<s>[INST] Manipulation of Taylor expansion of $e^x$ I have an expression:
$$ f(x) = \sum\limits_{N=0}^\infty (N-x)^2 \frac{x^N}{N!}$$
I want to figure out whose Taylor Expansion this is.
I've found that I can separate out the above expression, and get the following:
$$f(x) = \sum\limits_{N=0}^\infty N^2 \frac{x^N}{N!} - 2 \sum\limits_{N=0}^\infty xN \frac{x^N}{N!} + \sum\limits_{N=0}^\infty x^2 \frac{x^N}{N!}$$
I figured out this much:
$$x^2 e^x = \sum\limits_{N=0}^\infty x^2 \frac{x^N}{N!} = \sum\limits_{N=0}^\infty xN \frac{x^N}{N!}$$
$$xe^x = \sum\limits_{N=0}^\infty N \frac{x^N}{N!}$$
But I cannot figure out who the first mysterious sum belongs to!
 [/INST] Hint:
$$(x-n)^2=x^2-2nx+n^2=x^2-2nx+n(n-1)+n$$
so that 
$$\sum_{n=0}^\infty(x-n)^2\frac{x^n}{n!}\\
=\sum_{n=0}^\infty x^2\frac{x^n}{n!}-2\sum_{n=0}^\infty nx\frac{x^n}{n!}+\sum_{n=0}^\infty n(n-1)\frac{x^n}{n!}+\sum_{n=0}^\infty n\frac{x^n}{n!}\\
=x^2\sum_{n=0}^\infty \frac{x^{n}}{n!}-2x\sum_{n=1}^\infty \frac{x^{n}}{(n-1)!}+\sum_{n=2}^\infty\frac{x^n}{(n-2)!}+\sum_{n=1}^\infty\frac{x^n}{(n-1)!}\\
=x^2\sum_{n=0}^\infty \frac{x^{n}}{n!}-2x\sum_{n=0}^\infty \frac{x^{n+1}}{n!}+\sum_{n=0}^\infty\frac{x^{n+2}}{n!}+\sum_{n=0}^\infty\frac{x^{n+1}}{n!}.$$

$$xe^x.$$


The key to the solution is to decompose $n^2$ in terms of $n$ and $n(n-1)$ and to simplify with the factorials at the denominators. This generalizes to any polynomial in $n$.
</s>