About the generating function of the sum of roll dice values. I thought this exercise would be fairly easy, but it seems i can't find a proper approach to it.
I have to prove that $f(x) = (1-x-x^2-x^3-x^4-x^5-x^6)^{-1}$ is the function that generates the number of forms we can get a number $n$ as the sum of the values given rolling a dice -as many times as is needed-.
My first excerpt is to note that $f(x) = \displaystyle\frac{1}{1-(\sum_{i=1}^6x^i)}=\displaystyle\sum_{k=0}^{\infty}(x+\dots+x^6)^k$.
Now i would like to work from 'the other side' and see how many forms are to write a number $n$ as the sum of numbers from 1 to 6. I have in mind two steps:
(1) If i need to find the number of solution -without the restriction from 1 to 6- i'd have to find how many solutions are for each of the following equations  $x_1=n$; $x_1+x_2=n$, $\dots$; $x_1+\dots+x_n=n$. Then i found out that for each $m$ there are $\sum_{k=0}^{m-1}\binom{m-1}{k}=2^{m-1}$.
(2) Now i woud like to know how many solutions are if i consider the restriction $1\leq x_i \leq 6$. I'm not sure how to go from here, but i've been thinking about the principle of inclusion and exclusion and maybe it may goes as follows:
(2.1) There's only one sol. for $x_1=n$
(2.2) For $x_1+x_2=n$ with $0\leq x_i \leq 6$. 
There are $\binom{2+n-1}{n}=\binom{1+n}{n}$ solutions with $x_i\leq 0$
Let say that $x_1,x_2$ is a solution that sastisfies the condition $c_i$ if $x_i>6$. The answer should be $N(\bar{c_1},\bar{c_2}).$ By symmetry $N(c_1)=N(c_2)$. Now i'm looking the integer solutions for $x_1+x_2=n-7$ then $N(c_i)=\binom{2+(n-7)+1}{n-7}=\binom{n-4}{n-7}$, also $N(c_ic_j) = \binom{2+(n-14)-1}{n-14}=\binom{n-11}{n-14}$.
Then $N(\bar{c_1},\bar{c_2})= \binom{n+1}{n}-\binom{2}{1}\binom{n-4}{n-7}+\binom{2}{2}\binom{n-11}{n-14}$ gives the numer of solutions which satisfies $x_i\leq 6$?.
But how can i get rid of the solutions that involve $x_i = 0$?
Would be a good idea keep trying with this or there is an easier way?. I thought that if i get the number of solutions for $x_1+\dots+x_n=n$ with the restriction given i could find the generating function, but looking at the $f(x)$ given i'm not sure if what i did may help somehow.
Any hints?.
 A: Suppose you roll the die exactly $n$ times; then the generating function [edit] of the sum [/edit] is $(1+x+x^2+ \dots + x^6)^n$.  If you can roll the die an unlimited number of times, then the generating function is the sum of the GFs for n = 0, 1, 2, 3, ...
A: Let me first slightly rephrase the question: let $b_n$ be the number of ways you can get $n$ as the sum of any number of dices. Then
$$b_n=\sum_{k=1}^{n} \textrm{n. of solutions of} \quad x_1+\cdots+x_k=n$$ 
in positive integers less or equal than $6$. 
Now, for fixed $k$ the generating function is clearly ($x+x^2+\cdots+x^6)^k$.
In fact, note that the coefficient of $x^n$ in the expansion is exactly the number of ways of getting $n$ by summing $k$ numbers from $\{1,2,3,4,5,6\}$. 
Thus, the generating function for the $b_n$ is
\begin{align*} f(x)&=\sum_{k=1}^{n}(x+x^2+\cdots+x^6)^k\\
&\equiv\sum_{k=1}^{\infty}(x+x^2+\cdots+x^6)^k\\
&=(x+x^2+\cdots+x^6)+(x+x^2+\cdots+x^6)^2+\cdots\\
&=\frac{1}{1-x-x^2-x^3-x^4-x^5-x^6}.
\end{align*}
