2
$\begingroup$

I'm looking for a way to compute elements of a quintinomial triangle.

Is there a general case?

To be more specific I'm looking for a way to compute the coefficients of the polynomial $(x^4 + x^3 + x^2 +x + 1)^n $ , $\forall x\in\Bbb R , \forall n \in \Bbb N$ for consecutive values of n.

I'm working on project Euler problem 588.

  • 0
    you can also refer to [this OEIS section](http://oeis.org/A035343)2017-02-21

2 Answers 2

1

Here is a derivation of an expression which could be implemented. We use the coefficient of operator $[x^p]$ to denote the coefficient of $x^p$ in a series.

We obtain \begin{align*} [x^p]&(x^4+x^3+x^2+x+1)^n\\ &=[x^p]\left(\frac{1-x^5}{1-x}\right)^n\tag{1}\\ &=[x^p](1-x^5)^n\sum_{k=0}^\infty\binom{-n}{k}(-x)^k\tag{2}\\ &=[x^p]\sum_{j=0}^n\binom{n}{j}\left(-x^5\right)^j\sum_{k=0}^\infty\binom{n+k-1}{k}x^k\tag{3}\\ &=\sum_{j=0}^{\min\{n,\lfloor{p/5}\rfloor\}}\binom{n}{j}(-1)^j[x^{p-5j}]\sum_{k=0}^\infty\binom{n+k-1}{k}x^k\tag{4}\\ &=\sum_{j=0}^{\min\{n,\lfloor{p/5}\rfloor\}}(-1)^j\binom{n}{j}\binom{n+p-5j-1}{p-5j}\tag{5} \end{align*}

Comment:

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

  • In (2) we apply the binomial series expansion of $(1-x)^{-n}$.

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

  • In (4) we use the linearity of the coefficient of operator and use the rule $$[x^p]x^qA(x)=[x^{p-q}]A(x)$$ We also restrict the upper limit of the sum, since the exponent of $x^{p-5j}$ has to be non-negative.

  • In (5) we select the coefficient of $x^{p-5j}$.

0

Sorry, stupid question, and the site is blocking me from adding a comment....

What is P ? For example, would p=8 produce the coefficient for X^8 when n = 2?

  • 0
    I'm not seeing any $P$ used in the Question, so even as a Comment this would lack important context. Work at earning reputation in the Community and you will quickly earn the privilege of posting Comments. If you do have a new Question, related to this one, you can post a new one with a link to this for useful context.2017-02-21