<s>[INST] Taylor expansion for $\frac{1}{x^2 + 2x + 2}$ I'm trying to find the Taylor expansion of the function:
$$ f(x) = \frac{1}{x^2 + 2x + 2} $$
about the point $ x = 0 $. I have worked out the terms up to the fourth derivative, which was very tedious. I found:
$$ f(x) = \frac{1}{2} - \frac{1}{2} x + \frac{1}{4} x^2 + 0 x^3 - \frac{1}{8} x^4 + O \left( x^5 \right) $$
I notice powers of two in the denominator, but I'm not sure of the pattern (and to calculate the next term to confirm would entail another tedious product rule).
Any ideas? Thanks!
 [/INST] Note that
$$f(x)=\frac{1}{x^2 + 2x + 2}=\frac{1/2}{1+(x+x^2/2)}\\=\frac{1}{2}\left(1-(x+x^2/2)+(x+x^2/2)^2-((x+x^2/2)^3+o(x^3)\right).$$
In general, for any positive integer $n$,
$$2f(x)=1+\sum_{k=1}^n x^k(1+x/2)^k+o(x^n)=
\sum_{k=1}^n (-1)^k\sum_{j=0}^{n-k} \frac{1}{2^j}\binom{k}{j}x^{j+k}+o(x^n)\\
=1+\sum_{k=1}^n \frac{x^m}{2^m}\left(\sum_{k=1}^m(-2)^k\binom{k}{m-k}\right)+o(x^n).$$
P.S. Note that $a_m$, the coefficient of $x^m$, is related to the sequence A009116. It follows immediately from its generating function that it satisfies the linear sequence 
$$a_{m+1}=-\left(a_m+\frac{a_{m-1}}{2}\right).$$
</s>