Prove algebraically that $n(n+1)2^{n-2}=\sum_{k=1}^{n}k^2\dbinom{n}{k}$ where $n$ and $k$ are integers.
I start with the fact that $(x+1)^n=\sum_{k=0}^{n}\dbinom{n}{k}x^k$ and differentiate both sides of the equation twice, with respect to $x$.
The second derivative (with respect to $x$) of the above equation yields: $n(n-1)(x+1)^{n-2}=\sum_{k=0}^{n}k^2-k\dbinom{n}{k}x^{k-2}$.
Now, I am not sure how to proceed. I know I'm supposed to set $x = 1$. But even then, I am missing the $(n+1)$ on the left hand side and there is still a $-k$ on the right hand side.
Any help would be appreciated. Thank you.