Find the coefficient of $x^{20}$ in $(x^{1}+⋯+x^{6} )^{10}$ I'm trying to find the coefficient of $x^{20}$ in 
$$(x^{1}+⋯+x^{6} )^{10}$$
So I did this : 
$$\frac {1-x^{m+1}} {1-x} = 1+x+x^2+⋯+x^{m}$$
$$(x^1+⋯+x^6 )=x(1+x+⋯+x^5 ) = \frac {x(1-x^6 )} {1-x} = \frac {x-x^7} {1-x}$$
$$(x^1+⋯+x^6 )^{10} =\left(\dfrac {x-x^7} {1-x}\right)^{10}$$
But what do I do from here ? any hints ? 
Thanks 
 A: Since $(x+x^2+\cdots+x^6)^{10}=x^{10}(1+x+\cdots+x^5)^{10}$ and $1+x+\cdots+x^5=\frac{1-x^6}{1-x},$ we need to find the coefficient of $x^{10}$ in $(\frac{1-x^6}{1-x})^{10}=(1-x^6)^{10}(1-x)^{-10}.$ 
Since $(1-x^6)^{10}(1-x)^{-10} = (1-10x^6+45x^{12}+\cdots) \sum_{m=0}^{\infty}\binom{m+9}{9}x^{m},$ the coefficient of 
$x^{10}$ will be $\binom{19}{9}-10\binom{13}{9}. $
A: The coefficient of $x^{10}$ in $(1+ x + \ldots + x^5)^{10}$ is equal to the number of integers $0 \leq x_i \leq 5 $ such that $\sum_{i=1}^{10} x_i= 10$.
We apply the Principle of Inclusion and exclusion, to deal with the restriction of $x_i \leq 5$.
If the only restriction is $0 \leq x_i$ then there are ${10 + 9 \choose 9 } $ solutions by the bars and stars method (sum of 10 non-negative integers is 10).
If $x_1 \geq 6$, then we substitute $x_1 = 6 + x_1 ^*$, and there are ${4 + 9 \choose 9}$ solutions by the stars and bars method (sum of 10 non-negative integers is 4).
Observe that we can't have 2 terms which are more than $6$.
Hence, by PIE, the coefficient is ${ 19 \choose 9} - 10 { 13 \choose 9}$, which is 85228.
A: You can factor out $x^{10}$ so that your goal becomes to find the $x^{10}$ coefficient in $(1 + x + .. + x^5)^{10}$. By the Multinomial Theorem  one has
$$(1 + x + .. + x^5)^{10} = \sum_{k_1 + ... + k_6 = 10} \frac{10!}{k_1!k_2!k_3!k_4! k_5!k_6} x^{k_2 + 2k_3 + 3k_4 + 4k_5 + 5k_6}$$
Here the sum is over nonnegative integers. So what you need to do is find all $(k_1,...,k_6)$ such that $k_2 + 2k_3 + 3k_4 + 4k_5 + 5k_6 = 10$, or equivalently all 
$(k_2,...,k_6)$ such that such that $k_2 + 2k_3 + 3k_4 + 4k_5 + 5k_6 \leq 10$, then add up the corresponding coefficients.
A: Took me 20 seconds to figure out: 85228
Here is the python code:
    from sympy.abc import x
    from sympy import expand
    from math import factorial
    d1 = expand((x+x**2+x**3+x**4+x**5+x**6)**10).as_coefficients_dict()
    print d1[x**20]

