In his famous 1973 paper Gallagher showed that the distribution of prime numbers in short intervals tends to a Poisson distribution. To do it he uses in one step: $$\sum_{n \leq N}(\pi (n+h)-\pi(n))^{k}=\sum_{r=1}^{k} \sigma (k,r) \underset{distinct}{\sum_{1 \leq d_{1}< \dots <d_{r} \leq h}} \pi(N; \left \{ d_{1},d_{2},\dots,d_{r} \right \})$$
Where $\sigma (k,r)$ are the Stirling numbers of the second kind and $\pi(N; \left \{ d_{1},d_{2},\dots,d_{r} \right \}$ counts the different integers $x\leq N$ such that $\{x,x+d_{1},\dots,x+d_{r}\}$ are simultaneously primes. I understand that he has used $\sum_{k=0}^n \sigma (n,k)(x)_{k}=x^{n}$. Where $(x)_{k}$ is the falling factorial. Nevertheless, I do not understand why the identity is true. Any advice?
In the paper there is an intermediate step, mainly that $$\sum _{n\leq N}\left (\pi (n+h)-\pi (n)\right )^k=\sum _{n\leq N} \sum _{n<p_1,\cdots ,p_k\leq n+h}1,$$ this step what it does is just rewrite the understanding of $(\pi (n+h)-\pi (n))^k$ as $k$ choices of primes(i.e., $p_1,p_2,\cdots ,p_k$) in between $n+1$ and $n+h$ inclusively. Now, you may argue that some of this primes do not need to be different, and so what you want is to take into account when are not the same prime. So let say that there exists a partition $\sigma \vdash [k]$ in such a way that $p_i=p_j$ iff $i,j$ are in the same block of the partition, in this way we can now consider different primes. The number of such partitions is the Stirling numbers of the second kind and the way to choose different numbers is by noticing that if $p_1< p_2<\cdots <p_r$ then there are increasing numbers $d_1,d_2,\cdots , d_r$ such that $p_1=n+d_2,p_2=n+d_2,\cdots , p_r=n+d_r.$
Morally: This equation is just factoring the choices of the primes in between a partition and an injective choice of the primes. (which is the combinatorial interpretation of the equation that you provide).