Solving this generating function to find the $n$th term in the sequence

442 Views Asked by At

I have been given the generating function $$f(x) = \frac{x^2+x+1}{1-x^7},$$ and I need to solve for a closed form of the $n$th term of the sequence g generated by this function.

I have been trying to find a reasonable way to factor this function, but unfortunately, both the numerator and denominator are not very easily factorable, given the fact that the demoninator is of an odd degree. My friend recommended that I see that $$(1-x^7) = -(x-1)(x^6+x^5+x^4+x^3+x^2+x+1),$$ And Wolfram seems to be throwing back an unreasonable factorization when I try to factor $x^2+x+1$. Do I need to potentially do partial fractions using the big factorization for the denominator described above? If so, how would I got about doing the partial fractions method in that case? Any recommendations would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Since $$ \frac{1}{1-x^7} = \sum_{k\geq 0} x^{7k} \tag{1}$$ we have: $$ \frac{1+x+x^2}{1-x^7} = \sum_{n\geq 0} \eta(n)\, x^n \tag{2} $$ where $\eta(n)$ equals $1$ if $n\pmod{7}\in\{0,1,2\}$ and $0$ otherwise.