# Number of permutations of $S_n$ such that $\sigma^h(a) = \sigma^k(b)$

A basic result in combinatorics is:

In $S_n$ there are

• $(n-d)(n-2)!$ permutations $\sigma$ such that $\sigma^k(a) = b$, if $a \neq b$;
• $d(n-1)!$ permutations $\sigma$ such that $\sigma^k(a) = b$, if $a = b$,

where $d$ is the number of positive divisors of $k$.

This lemma makes me wonder:

In $S_n$ how many permutations $\sigma$ are there such that $$\sigma^k(a) = \sigma^h(b),$$ where $k \neq h$ (and $a = b$ or $a \neq b$)?

Since $\sigma$ is bijective, you can apply $\sigma^{-h}$ to transform this to
$$\sigma^{k-h}(a)=b\;,$$