Prove that $\sum_{k=1}^n k^2 \binom{n}{k}=n(n+1)2^{n-2}$
I tried like this:
I used induction on $n$. I took $n=2$ then $LHS= \sum_{k=1}^2 k^2\binom{n}{k}=1\times 2+4\times 1=6$ and $RHS=2(2+1)=6$
and so its verified.
Now we assume that $\sum_{k=1}^n k^2 \binom{n}{k}=n(n+1)2^{n-2}$ is tue. We prove it for $n+1$.
Now $\sum_{k=1}^{n+1} k^2 \binom{n+1}{k}=\sum_{k=1}^n k^2 \binom{n+1}{k}+(n+1)^2$.
I cant know how to get $(n+2)(n+1)2^{n-1}$ from here.
Can someone please help me out?
I found an answer here https://math.stackexchange.com/a/231602/665065 which is the best and efficient. Thank you all for your effort