Let $f(x)=xe^x$. I know
$$e^x=\sum_{n=0}^\infty \frac{x^n}{n!}$$
and so
$$f(x)=x\sum_{n=0}^\infty \frac{x^n}{n!}=x(1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+...)=x+x^2+\frac{x^3}{2!}+\frac{x^4}{3!}+...=\sum_{n=0}^\infty \frac{x^{n+1}}{n!}$$
But shouldn't this other representation be also correct?
$f'(x)=e^x+xe^x, f''(x)=2e^x+xe^x, f'''(x)=3e^x+xe^x,... \implies f^{(n)}(x)=ne^x+xe^x \implies f^{(n)}(0)=n$
Because I want $f(x)=\sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n$ then
$$f(x)=\sum_{n=0}^\infty \frac{n}{n!}x^n$$
If this other representation is also correct, then how $\sum_{n=0}^\infty \frac{n}{n!}x^n=\sum_{n=0}^\infty \frac{x^{n+1}}{n!}$?
The index of the second sum can start from $1$ because $0/0!=0/1=0$. Then, with reindexing, $$\sum_{n=1}^\infty\frac n{n!}x^n=\sum_{n=1}^\infty\frac 1{(n-1)!}x^n=\sum_{n=0}^\infty\frac{x^{n+1}}{n!}$$