Let $a_n$ be the number of series of numbers between 1 and 6, such that their sum equals $n$. I need to find the generating function to the problem: $$f(x)=\sum_{n=0}^{\infty} a_n\cdot x^n$$ Note: $a_0 = 0$.
I thought about finding a generating function for each possible length of such series, $k$. then for some $k$ I have: $$\left[\frac{x\cdot (x^6-1)}{x-1}\right]^k$$
Then I summed up for $k$ from 1 to $n$ and got: $$\sum_{k=1}^{n}\left[\frac{x\cdot (x^6-1)}{x-1}\right]^k$$ Is it the right way to go? or am I missing something? this subject is pretty confusing... thanks.