Permutations $\sigma$ in the symmetric group $S_n$ can be characterized by their Cayley distance $C_\sigma$, being the minimal number of transpositions needed to convert $\{1,2,3,\ldots n\}$ into $\sigma$. The sign of the permutation is $(-1)^{C_\sigma}$.

For example, when $\sigma=\{2, 3, 4, 5, 1\}$, one has $C_\sigma=4$ and for $\sigma=\{1, 2, 3, 5, 4\}$ one has $C_\sigma=1$. Of the $5!$ permutations in $S_5$ there are, respectively, $1,10,35,50,24 $ with Cayley distance $C_\sigma=0,1,2,3,4$.

Question: What is the general formula that counts the number of permutations at a given Cayley distance?

$\begingroup$@MartinRubey --- wonderful, thank you for the rapid answer; so the number of permutations in $S_n$ at Cayley distance $k\in\{0,1,2,\ldots,n-1\}$ equals $|s_{n,n-k}|$, the Stirling number of the first kind.$\endgroup$
– Carlo BeenakkerMay 11 at 20:24