Find coefficient of $x^n$ in $(1+x+2x^2+3x^3+.....+nx^n)^2$

11.9k Views Asked by At

Find coefficient of $x^n$ in

$(1+x+2x^2+3x^3+.....+nx^n)^2$

My attempt:Let $S=1+x+2x^2+3x^3+...+nx^n$

$xS=x+x^2+2x^3+3x^4+...+nx^{n+1}$

$(1-x)S=1+x+x^2+x^3+....+x^n-nx^{n+1}-x=\frac{1-x^{n+1}}{1-x}-nx^{n+1}-x$

$S=\frac{1}{(1-x)^2}-\frac{x}{1-x}=\frac{1-x+x^2}{(1-x)^2}$. (Ignoring terms which have powers of x greater than $x^n$)

So one can say that

coefficient of $x^n$ in $(1+x+2x^2+3x^3+.....+nx^n)^2$

=coefficient of $x^n$ in $(1-x+x^2)^2(1-x)^{-4}$

Is there a shorter way.

3

There are 3 best solutions below

7
On BEST ANSWER

Such coefficient is clearly $$ 2n+\sum_{k=1}^{n-1} k(n-k) = \frac{n(n^2+11)}{6}.$$

3
On

Hint: use $$ (f(x)g(x))^{(n)}=\sum_{k=0}^n\binom{n}{k}f^{(n-k)}(x)g^k(x).$$ The coefficient of $x^n$ is $(f(x)g(x))^{(n)}(0)/n!$.

0
On

Concluding my attempt

Let $S=1+x+2x^2+3x^3+...+nx^n$

$xS=x+x^2+2x^3+3x^4+...+nx^{n+1}$

$(1-x)S=1+x+x^2+x^3+....+x^n-nx^{n+1}-x=\frac{1-x^{n+1}}{1-x}-nx^{n+1}-x$

$S=\frac{1}{(1-x)^2}-\frac{x}{1-x}=\frac{1-x+x^2}{(1-x)^2}$. (Ignoring terms which have powers of x greater than $x^n$)

So one can say that

coefficient of $x^n$ in $(1+x+2x^2+3x^3+.....+nx^n)^2$

=coefficient of $x^n$ in $(1-x+x^2)^2(1-x)^{-4}$

=coefficient of $x^n$ in $(1-2x+3x^2-2x^3+x^4)(1-x)^{-4}$

=$\binom{n+3}{3}-2\binom{n+2}{3}+3\binom{n+1}{3}-2\binom{n}{3}+\binom{n-1}{3}$

=$\frac{n^3+11n}{6}$.

which is too long.