TITLE: Combinatorial argument for $\sum_{k=0}^n k^2 \binom{n}{k} = n(n+1)2^{n-2}$
QUESTION [5 upvotes]: Can you please give a combinatorial argument for the argument below?

$$\sum_{k=0}^n k^2 \binom{n}{k} = n(n+1)2^{n-2}$$

From RHS, I drew the following argument: There are $n+1$ people. In how many ways, can we pick $n-1$ people and divide them into $2$ distinct committees say $C_1$ and $C_2$. I cannot get the same argument from LHS. Can you help me?

REPLY [6 votes]: Here is another way of looking at this equation.
Consider the number of ways $P$ of selecting a committee from $n$ candidates with either one chair or two distinct chairs. This can be done in two ways
1) Select the chair(s) first and pick any subset of the remaining candidates.
   $$ P = n2^{n-1}+n(n-1)2^{n-2}=n(n+1)2^{n-2} $$
2) Select a $k$ member team and then choose the chair(s) amongst them.
$$ P = \sum_{k=0}^{n} {n \choose k} \left( k(k-1) + k\right) = \sum_{k=0}^nk^2{n \choose k} $$
(Note: I had already pointed this out in the comments, but thought it would be helpful to write it out as an answer)