Consider a polynomial of power n:
$P(x)=1+x+x^2+\dots+x^n$
How do I find coefficient of $x^k$, where $0\le k\le 3n$ of the polynomial $P^3(x)$?
I have tried plugging in different values of $n$ to find the logic and here are my results:
- There is a symmetry line of $k=\frac{3n}{2}$
- For $k\le n$ the coefficient is always given by $\frac{k(k+1)}{2}$
Let's simplify the expression $ (1 - x^{n+1})^m $ using some familiar techniques. When the power is a positive integer, we can leverage the standard binomial theorem:
$$ (1 - x^{n+1})^m = \sum_{i=0}^m (-1)^i \binom{m}{i} x^{(n+1)i} $$
On the other hand, for $ (1 - x)^{-m} $, where the power is a negative integer, we turn to the negative binomial theorem:
$$ (1 - x)^{-m} = \sum_{j=0}^\infty \binom{m+j-1}{j} x^j $$
Now, let's combine these results by multiplying the two sums:
$$ \left( \frac{1 - x^{n+1}}{1 - x} \right)^m = \sum_{i=0}^m \sum_{j=0}^\infty (-1)^i \binom{m}{i} \binom{m+j-1}{j} x^{(n+1)i+j} $$
This expression reveals the coefficient for $x^k$, which is given by:
$$ \sum_{\substack{0 \leq i \leq m, \\ j \geq 0 \\ (n+1)i+j=k}} (-1)^i \binom{m}{i} \binom{m+j-1}{j} $$
now you can use this result directly to your problem
any combinotorics books will must have this kind of problems