Give a combinatorial proof that if $n$ is a positive integer then $\sum_{k=0}^{n} k^{2}\left(\begin{array}{l}{n} \\ {k}\end{array}\right)=n(n+1) 2^{n-2}$ . [Hint: Show that both sides count the ways to select a subset of a set of $n$ elements together with two not necessarily distinct elements from this subset. Furthermore, express the right-hand side as $n(n-1) 2^{n-2}+n 2^{n-1} . ]$
Counting
Binomial Coefficients and Identities