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.
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.
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}$.