I have been working on the following question:
Find a recurrence relation for the number of regions created by $n$ mutually intersecting circles on a piece of paper (no three circles have a common intersecting point). Then, show using the generating function that $$a_n = n^2 - n +2$$ for $n \ge 1$.
I have found $$a_n = a_{n-1} + 2(n-1)$$ with $a_1 = 2$. I have also found that the generating function is $$f(x) = \frac{2x^3-2x^2+2x}{(1-x)^3}.$$ Now, I just have to rewrite it to the power series, but I can't seem to get the right result. Can somebody help me with this?
Thanks in advance!
Applying partial fraction decomposition yields \begin{align} \frac{2x^3-2x^2+2x}{(1-x)^3} &= -2 + \frac{4}{1-x} - \frac{4}{(1-x)^2} + \frac{2}{(1-x)^3} \\ &= -2 + 4\sum_{n \ge 0} x^n - 4 \sum_{n \ge 0} \binom{n+1}{1} x^n + 2 \sum_{n \ge 0} \binom{n+2}{2} x^n \\ &= -2x^0 + \sum_{n \ge 0} \left(4 - 4 \binom{n+1}{1} + 2 \binom{n+2}{2}\right) x^n, \end{align} which immediately implies that \begin{align} a_n &= -2[n=0] + 4 - 4 \binom{n+1}{1} + 2 \binom{n+2}{2} \\ &= -2[n=0]+n^2-n+2 \\ &= \begin{cases} 0 &\text{if $n=0$} \\ n^2-n+2 &\text{if $n>0$} \end{cases} \end{align}