Determining the coefficients of $(1 + x + x^2 +\cdots+x^n)^{n-1}$

$\sum_{i=0}^{k\cdot m}c_ix^i=(1+x^1+x^2+...+x^m)^{k}$ is the generating function of the number of weak integer compositions (integer compositions with repetitions of $0$) of integer $i$ with $k$ parts where all parts are lower equal to $m$.

Unfortunately, it is not yet in OEIS.

$k,m>0$

Their coefficients are:

$$c_i=\sum_{j=0}^{\frac{i+k-1}{m+1}}(-1)^{j}\binom{k}{j}\binom{i+k-j(m+1)-1}{k-1}.$$

[Stanley 1999], Mistake in the closed form formula for the number of restricted compositions?

with $n>0$, $k=n$, $m=n+1$:

$$c_i=\sum_{j=0}^{\frac{i+n-1}{n+2}}(-1)^{j}\binom{n}{j}\binom{i+n-j(n+2)-1}{n-1}$$

$\ $

[Stanley 1999] Stanley, R. P.: Enumerative Combinatorics Vol. I. Cambridge University Press, 1999


We use the coefficient of operator $[x^k]$ to denote the coefficient of $x^k$ of a series.

We obtain for $0\leq k\leq n(n-1)$: \begin{align*} \color{blue}{[x^{k}]}&\color{blue}{\left(1+x+x^2+\cdots+x^n\right)^{n-1}}\\ &=[x^k]\left(\frac{1-x^{n+1}}{1-x}\right)^{n-1}\tag{1}\\ &=[x^k]\sum_{j=0}^\infty\binom{-(n-1)}{j}(-x)^j\sum_{l=0}^{n-1}\binom{n-1}{l}\left(-x^{n+1}\right)^l\tag{2}\\ &=[x^k]\sum_{j=0}^\infty\binom{n-j-2}{j}x^j\sum_{l=0}^{n-1}\binom{n-1}{l}(-1)^lx^{(n+1)l}\tag{3}\\ &=\sum_{j=0}^{k}\binom{n-j-2}{j}[x^{k-j}]\sum_{l=0}^{n-1}\binom{n-1}{l}(-1)^lx^{(n+1)l}\tag{4}\\ &=\sum_{j=0}^{k}\binom{n-k+j-2}{k-j}[x^{j}]\sum_{l=0}^{n-1}\binom{n-1}{l}(-1)^lx^{(n+1)l}\tag{5}\\ &=\sum_{j=0}^{\left\lfloor\frac{k}{n+1}\right\rfloor}\binom{n-k+(n+1)j-2}{k-(n+1)j}[x^{(n+1)j}]\sum_{l=0}^{n-1}\binom{n-1}{l}(-1)^lx^{(n+1)l}\tag{6}\\ &\,\,\color{blue}{=\sum_{j=0}^{\left\lfloor\frac{k}{n+1}\right\rfloor}\binom{(n+2)j-k-2}{k-(n+1)j}\binom{n-1}{j}(-1)^j}\tag{7}\\ \end{align*}

Comment:

  • In (1) we use the finite geometric series formula.

  • In (2) we use the binomial series expansion and apply the binomial theorem.

  • In (3) we use the binomial identity $\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q$.

  • In (4) we apply the rule $[x^{p-q}]A(x)=[x^p]x^qA(x)$ and set the upper limit of the outer sum to $k$ since indices $j>k$ do not contribute.

  • In (5) we reverse the order of summation of the outer sum: $j\to k-j$.

  • In (6) we consider only $(n+1)$-multiples of $j$ since other values do not occur as exponent of $x$ in the inner sum.

  • In (7) we finally select the coefficients of $x^{(n+1)j}$ by taking $l=j$.

Tags:

Polynomials