Calculating Coefficents of a single variable polynomial

62 Views Asked by At

Given: $$ (1+x+x^2+x^3+\cdots+x^k)^n $$

Is there a formula to calculate the coefficient of $x^a$ (where $a$ can be any integer value less than $k^n$) that's more efficient than grinding through every possible permutation that sums to $a$ with the multinomial theorem and then summing them all?