I am struggling with a formula that I derived, which (I believe) can be simplified further.
In principle, I want to determine the coefficients of the following polynomial: \begin{align} p(x) = (1+x+...+x^{q-1})^L = \sum_{n=0}^{L(q-1)} c_n x^n \end{align}
I have found the following formula \begin{align} c_n = \sum_{k=0}^{\text{floor}[n/q]} (-1)^k \binom{L}{k}\binom{L-1+n-qk}{L-1} \end{align} which looks like a few binomial identities can be applied. However, the difficult part is that one factor scales with $k$ while the other scales with $qk$.
It actually reduces to a simple binomial for $q=2$: $c_n=\binom{L}{n}$.
I happy for any suggestions!