How would I go about evaluating this series?
$$\sum_{i=1}^n i^2 {n \choose i}$$
I know that $\sum_{i=1}^n i {n \choose i} = n2^{n-1}$, but am stumped as to how to evaluate when i is replaced by $i^2$
Proof of $\sum_{i=1}^n i {n \choose i} = n2^{n-1}$:
$$(1+x)^n = {n \choose 0}x^0 +{n \choose 1}x^1 + {n \choose 2}x^2 + ... {n \choose n}x^n$$
Taking the derivative of both sides with respect to x gives:
$$n(1+x)^{n-1} = 1{n \choose 1}x^0 + 2{n \choose 2}x^1 + ... n{n \choose n}x^{n-1}= \sum_{i=1}^n i x^{n-1}{n \choose i}$$
Letting x = 1 we are left with:
$$n2^{n-1}= \sum_{i=1}^n i {n \choose i}$$