Given the equation
$$x(x-1)(x-2)(x-3)(x-4)\ldots(x-100),$$
how can I efficiently calculate the coefficients of $x^1,x^2,x^3,\ldots$ without actually multiplying the terms?
Given the equation
$$x(x-1)(x-2)(x-3)(x-4)\ldots(x-100),$$
how can I efficiently calculate the coefficients of $x^1,x^2,x^3,\ldots$ without actually multiplying the terms?
Please access OEIS sequence A008276 for information. You can use the recurrence to calculate the coefficients. It is $$T(n,k) = T(n-1,k) - (n-1)T(n-1,k-1).$$ For example, given $$ x(x-1)(x-2) = 1x^3 - 3x^2 + 2x + 0 $$ then compute $$ x(x-1)(x-2)(x-3) = 1x^4 - 6x^3 + 11x^2 - 6x + 0$$ as follows: $$ 1 = 1,\quad -6 = -3 - 3\cdot1,\quad +11 = +2 - 3\cdot-3, \quad-6 = 0 - 3\cdot 2,\quad 0 = 0.$$