<s>[INST] Binomial Theorem and $n(n+1)2^{n-2} = \sum_{i=1}^ni^2\binom{n}{i}$ $n(n+1)2^{n-2} = \sum_{i=1}^ni^2\binom{n}{i}$
I had proved this combinatorially but also trying to derive this identity using binomial theorem.
From the bionomial theorem, one could easily get $2^n = \sum_{k=0}^n\binom{n}{k}$
Using this LHS could be equated with$\binom{n+1}{2}{1\over2} \sum_{k=0}^n\binom{n}{k}$
I'd like to go further to make this form closer to  $\sum_{i=1}^ni^2$ but it's hard to imagine where to go.
Any advice?
 [/INST] Let,
$$(1+x)^n=\binom{n}{0}+\binom{n}{1}x+\binom{n}{2} x^2\cdots +\binom{n}{n} x^n$$$$$$
Differentiating wrt x,
$$n(1+x)^{n-1}=\binom{n}{1}+2\binom{n}{2}x+3\binom{n}{3} x^2+\cdots +n\binom{n}{n} x^{n-1}$$$$$$
Multiplying both sides by x,
$$n(1+x)^{n-1} x=\binom{n}{1}x+2\binom{n}{2}x^2+3\binom{n}{3}x^3+\cdots +n\binom{n}{n}x^n$$$$$$
Differential wrt x,
$$\frac{d}{dx}(n(1+x)^{n-1}x)=\binom{n}{1}+2^2\binom{n}{2}x+3^2\binom{n}{3}x^2+\cdots +n^2\binom{n}{n} x^{n-1}$$$$$$
$$n((n-1)x(1+x)^{n-2}+(1+x)^{n-1})=\binom{n}{1}+2^2\binom{n}{2}x+3^2\binom{n}{3}x^2+\cdots +n^2\binom{n}{n} x^{n-1}$$$$$$
$$n(1+x)^{n-2}(nx+1)=\binom{n}{1}+2^2\binom{n}{2}x+3^2\binom{n}{3}x^2+\cdots +n^2\binom{n}{n} x^{n-1}$$$$$$
Put $x=1$,
$$n(1+1)^{n-2}(n+1)=\binom{n}{1}+2^2\binom{n}{2}+3^2\binom{n}{3}+\cdots +n^2\binom{n}{n}$$$$$$
$$n(n+1)2^{n-2}=\binom{n}{1}+2^2\binom{n}{2}+3^2\binom{n}{3}+\cdots +n^2\binom{n}{n}$$
Hence...
$$n(n+1)2^{n-2} = \sum_{i=1}^ni^2\binom{n}{i}$$
</s>