Closed-form expression for $\sum_{k=0}^n\binom{n}kk^p$ for integers $n,\,p$

Is there a closed-form expression for the sum $\sum_{k=0}^n\binom{n}kk^p$ given positive integers $n,\,p$? Earlier I thought of this series but failed to figure out a closed-form expression in $n,\,p$ (other than the trivial case $p=0$).

$$p=0\colon\,\sum_{k=0}^n\binom{n}kk^0=2^n$$

I know that $\sum_{k=0}^n\binom{n}k=2^n$ and $\sum_{k=0}^nk^n=\frac{k^{n+1}-1}{k-1}$ but I am unsure of whether these would be of much use now.


Additionally, what about the similar series $\sum_{k=0}^n\binom{n}kk^n$ where $p=n$?


Solution 1:

If you consider $p$ as fixed, then the below can be considered as closed form I suppose:

$$\sum_{k=0}^{n} \binom{n}{k} k^p = \sum_{k=1}^{p} s(p,k) n(n-1)\dots(n-k+1) 2^{n-k} \quad \quad (1)$$

where $s(k,p)$ is a stirling number of the second kind.

If you denote the operator of differentiating and multiplying by $x$ as $D_{x}$

Then we have that

$$(D_{x})^{n}f(x) = \sum_{k=1}^{n} s(n,k) f^{k}(x) x^{k}$$

where $s(n,k)$ is the stirling number of the second kind and $f^k(x)$ is the $k^{th}$ derivative of $f(x)$.

This can easily be proven using the identity $$s(n,k) = s(n-1,k-1) + k \cdot s(n-1,k)$$

To prove $(1)$ above, we apply $D_x$, $p$ times to $(1+x)^n$, and set $x=1$.

Solution 2:

Let $$ f(x)=(e^x+1)^n=\sum_{k=0}^n \binom{n}{k}e^{kx}. $$

Then $$ \left(\frac{d}{dx}\right)^p f(x)=\sum_{k=0}^n\binom{n}{k}k^pe^{kx}.$$

Plug in $x=0$.