Calculate coefficients of polynomial

33 Views Asked by At

Let's say I have the following polynomial:

$p(x)=(x+1)(x+2)(x+3)...(x+n)$

I want to find an expression for the coefficients $a_i$ of every term when I write the polynomial like this:

$p(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0$

I tried by looking at some simple examples for small values of $n$ but I can't figure out an expression. Here are some examples with small $n$:

$p_1(x)=(x+1)=x+1$

$p_2(x)=(x+1)(x+2)=x^2+3x+2$

$p_3(x)=(x+1)(x+2)(x+3)=x^3+6x^2+11x+6$

$p_4(x)=(x+1)(x+2)(x+3)(x+4)=x^4+10x^3+35x^2+50x+24$

(It's obvious that the coefficient of $x^n$ will always be $1$ ,that the coefficient of $x^{n-1}$ is the sum of numbers from $1$ to $n$ so $a_{n-1}=\frac{n(n+1)}{2}$ and that the coefficient of $x^0$ is $n!$, but I have no idea about the other ones)