Is there any elementary way to derive a closed form for the following sum:
$$\sum_{k=0}^{n}k^{r}\binom{n}{k}$$
Where $r$ is a fixed number.
I tried like that:
$$\left(1+x\right)^{n}=\sum_{k=0}^{n}\binom{n}{k}x^{k}$$ Taking the derivative of both sides with respect to $x$ yields:
$$n\left(1+x\right)^{\left(n-1\right)}=\sum_{k=0}^{n}\binom{n}{k}kx^{\left(k-1\right)}$$
Multiplying both sides by $x$:
$$xn\left(1+x\right)^{\left(n-1\right)}=\sum_{k=0}^{n}\binom{n}{k}kx^{k}$$
Again taking the derivative of both sides with respect to $x$: $$n\left(1+x\right)^{\left(n-1\right)}+xn\left(n-1\right)\left(1+x\right)^{\left(n-2\right)}=\sum_{k=0}^{n}\binom{n}{k}k^{2}x^{\left(k-1\right)}$$
But I don't know if repeating this process will give us a good closed form (if I was sure then finally we just need to set $x=1$ to get what we want).
I know the answer when $r=0$ and that easily can be derived , but the exponential $r$ is something that prevents me of computing, any hint is appreciated.
Use moments of binomial distribution
$$E_p(X^r)=\sum_{x=0}^{n} x^r \binom{n}{x} p^x (1-p)^{n-x} $$
for $p=.5$
$$\sum_{x=0}^{n} x^r \binom{n}{x}=2^n E_{p=.5}(X^r).$$
For $E(X^r)$ see Knoblauch (2008).