The number of partitions of a set with $m$ elements into $n$ nonempty subsets is given by the Stirling numbers of the second type, $S(m,n)$. The formula to find $S(m,n)$ is said to be:
$$ S(m,n)=\frac{1}{n!}\sum_{k=0}^n (-1)^k\binom{n}{k}(n-k)^m $$
But at some places it is given as:
$$ S(m,n)=\frac{1}{n!}\sum_{k=0}^n (-1)^{n-k}\binom{n}{k}k^m $$
How do I go to the second formula from the first one ?
We can go from one formula to the other by reverting the order of summation $k\rightarrow n-k$. In general we have by switching the summation order this way: \begin{align*} \sum_{k=0}^na_k =\sum_{k=0}^na_{n-k} \end{align*}