Is this generating function correct?

45 Views Asked by At

I haven't learned how to calculate generating functions, but I know it has to do with reciprocal functions being equal to regular polynomials, which reminds me of geometric series. I decided to make a generating function problem up so I could solve it. So, is the bottom generating function here correct?:$$\frac{1}{x^2-x+1}=1+x-x^2+x^3-...=1+\sum_{k\ge0}(-1)^kx^{k+1}$$I did this by factoring to get the ratio $x(1-x)$, substituted it into the infinite geometric series formula, expanded the binomials, and simplified.