<s>[INST] Calculating coefficient I have a generating function,
$$ \frac{(1-x^7)^6}{(1-x)^6} $$
and I want to calculate the coefficient of $x^{26}$
Solution for this is,
$$ {26+5 \choose 5} - 6{19+5 \choose 5} + 15{12+5 \choose 5} - 20{5+5 \choose 5} $$
Is there formula for this? If there is, what is called?
If there is no formula, how can I calculate it?
Thanks!
 [/INST] Use the Negative binomial series:
$$\begin{align}[x^{26}]\frac{(1-x^7)^6}{(1-x)^6}&=[x^{26}](1-x^7)^6\cdot (1-x)^{-6}=\\
&=[x^{26}]\sum_{i=0}^6 {6\choose i}(-x^7)^i\cdot \sum_{j=0}^{\infty} {-6\choose j}(-x)^j=\\
&=[x^{26}]\sum_{i=0}^6 {6\choose i}(-x^7)^i\cdot \sum_{j=0}^{\infty} {6+j-1\choose j}x^j=\\
&=[x^{26}]\left[{6\choose 0}(-x^7)^0\cdot {6+26-1\choose 26}x^{26}+\\
\qquad \qquad {6\choose 1}(-x^7)^1\cdot {6+19-1\choose 19}x^{19}+\\
\qquad \qquad {6\choose 2}(-x^7)^2\cdot {6+12-1\choose 12}x^{12}+\\
\qquad \qquad {6\choose 3}(-x^7)^3\cdot {6+5-1\choose 5}x^{5}+\right]=\\
&={6\choose 0}{31\choose 26}-{6\choose 1}{24\choose 19}+{6\choose 2}{17\choose 12}-{6\choose 3}{10\choose 5}.\end{align}$$
</s>