generating functions / combinatorics Calculate number of solutions of the following equations:
$$ x_1 + x_2 + x_3 + x_4 = 15 $$
where $ 0 \le x_i < i + 4 $ 
I try to solve it using generating functions/enumerators :
$$ (1+x+x^2+x^3+x^4)(1+x+x^2+x^3+x^4+x^5)(1+x+x^2+x^3+x^4+x^5+x^6)(1+x+x^2+x^3+x^4+x^5+x^6+x^7)$$
and take coefficient near $15$. But I do not know how to quickly calculate it. Maybe there exists any faster way?

The expression you have is 
$$
\frac{1-x^5}{1-x}\frac{1-x^6}{1-x}\frac{1-x^7}{1-x}\frac{1-x^8}{1-x}
$$
Then treat this as 
$$
(1-x^5)(1-x^6)(1-x^7)(1-x^8)(1-x)^{-4}
$$
The $(1-x)^{-4}$ can be treated by taking derivatives for the geometric series $(1-x)^{-1}$, and you can easily compute the product of the first four terms. 
What you need is only the terms $c_k x^k$ where $k\leq 15$, and find $15-k$-th coefficient in $(1-x)^{-4}$.  
