I would like to find a combinatorial proof of the identity: $$ \sum_{k=1}^n k^2{n \choose k} = n(n + 1)2^{n - 2}. $$ Combinatorial means that I should find out that the left hand side and the right hand side of the equation are just two different ways of counting the elements of the same set.
My attempt is: I notice that a single term in the summation on the left hand side counts how many functions send $k$ elements to themselves out of a set of $n$ elements. So overall, the left hand side counts all the functions that can be built out of the set $[1,\dots,n]$, where two functions that have the same mapping rule, but different domain/codomain are considered distinct.
I do not know how to proceed for the right hand side. I see that $2^{n-2}$ counts the number of subsets of a set with $n-2$ elements, but I don't find this very useful for proving the equality.