In expansion of ${\ \left( 1+x+x^{2} +\cdots+x^{p}\right)^{n} =a_{0} +a_{1} x+a_{2} x^{2} +\cdots+a_{np}} x^{np}$, prove that ${a_{1} +2a_{2} +3a_{3} +\cdots+np\ a_{n}}_{p} \ =\frac{np}{2}( 1+p)^{n}$.
My attempt: ${\ \left( 1+x+x^{2} +\cdots+x^{p}\right)^{n} =a_{0} +a_{1} x+a_{2} x^{2} +\cdots+a_{np}} x^{np}$ for $x=1$, $(1+p)^n=a_0+a_1+a_2+a_3+\cdots+a_{np}$ if we multiply $(a_o+a_1x+a_2x^2+\cdots+a_{np}x^{np})(1+2\frac{1}{x}+3\frac1{x^2}+4\frac{1}{x^3}+\cdots)$ we will get terms independent of $x$, $a_0+2a_1+3a_2+\cdots+(np+1)a_{np}$ then if we subtract $(1+p)^n$ from it, then we will get ${a_{1} +2a_{2} +3a_{3} +\cdots+np\ a_{n}}_{p}$ so we need to find term independent of $x$ in $(1+x+x^2+\cdots+x^{p})^n (1-\frac{1}{x})^{-2}$ simplifying further $(1+x+x^2+\cdots+x^{p})^n x^2 (1-x)^{-2}$ here no terms will be free of $x$ hence term will be $0$, subtracting $(1+p)^n$ from it we have ${a_{1} +2a_{2} +3a_{3} +\cdots+np\ a_{n}}_{p}=-(1+p)^n$ .
$$(1+x+x^2+...+x^p)^n=(a_0+a_1x+a_2x^2+....+a_{np}x^{np})$$ D.w.r.t. $x$ on both sides $$n(1+x+x^2+...+x^p)^{n-1}(1+2x+3x^2+4x^3+...+px^{p-1})=a_1+2a_2x+a_3x^2+a_4x^3+...+np a_{np} x^{np-1}$$ Put$x=1$ to get $$n (1+p)^{n-1}\frac{p(p+1)}{2}=a_1+2a_2+3a_3+...+np a_{np}=\frac{1}{2}np(1+p)^n.$$