<s>[INST] A general formula to generate functions of power series I have been playing with Maclaurin series lately, I have been able to come across this:
$\dfrac{1}{1+x}=1-x+x^2-x^3+x^4-x^5...$
$\dfrac{1}{(1+x)^2}=1-2x+3x^2-4x^3+5x^4-6x^5+7x^6...$
I found out by accident that:
$\dfrac{1-x}{(1+x)^3}=1-2^2x+3^2x^2-4^2x^3+5^2x^4+6^2x^5...$
I found in an old paper of Euler that this can continue on with these functions:
$\dfrac{1-4x+x^2}{(1+x)^4}=1-2^3x+3^3x^2-4^3x^3+5^3x^4+6^3x^5...$
$\dfrac{1-11x+11x^2-x^3}{(1+x)^5}=1-2^4x+3^4x^4-4^4x^3+5^4x^4+6^4x^5...$
$\dfrac{1-26x+66x^2-26x^3+x^4}{(1+x)^5}=1-2^5x+3^5x^4-4^5x^3+5^5x^4+6^5x^5...$
$\dfrac{1-57x+320x^2-302x^3+57x^4-x^5}{(1+x)^5}=1-2^6x+3^6x^4-4^6x^3+5^6x^4+6^6x^5...$
and so on...
Is there a general formula to generate the functions on the right hand side? How did Euler calculate these series? I have to say I deeply respect him since only he and Ramanujan know how to play with series.
 [/INST] Given any analytic function $f ,f(x)=\sum_{n=0}^{\infty}f^n(0)x^n/n!$.You are guaranteed to get a series representation iff $R_n(x)=f(x)-\sum_{k=0}^{n}f^k(0)x^k/k! \to 0$ pointwise as $n\to \infty$.
</s>