Suppose we begin with a random permutation of the first $n$ integers. At each step, we do the following:
Leave the integers already in the correct position where they are
For the remaining integers, say $a_1, a_2, \ldots, a_{k},$ perform a (random) derangement (in other words, $\sigma$ has no fixed points) $\sigma: \{1, 2, \ldots, k\} \to \{1, 2, \ldots, k\}$ on the set of indices, i.e. take $\{a_1, a_2, \ldots, a_{k}\}$ to $\{a_{\sigma(1)}, a_{\sigma(2)},\ldots, a_{\sigma(k)}\}.$
Repeat this until we arrive at the correct ordering, namely $\{1, 2, 3, \ldots, n\}.$ What is the expected number of steps for this process?
Example: If you start with the permutation $\{2, 1, 4, 3\},$ then there are $9$ possibilities for the next step (by composing with a derangement), namely:$\{1, 2, 3, 4\}, \{1, 3, 2, 4\}, \{1, 4, 3, 2\}, \{3, 2, 1, 4\},$ $\{3, 4, 2, 1\}, \{3, 4, 1, 2\}, \{4, 2, 3, 1\}, \{4, 3, 1, 2\},$ and $\{4, 3, 2, 1\}.$
If, instead, we had started with $\{1, 3, 4, 2\},$ then the possibilities would be $\{1, 2, 3, 4\}$ and $\{1, 4, 2, 3\}.$
See AoPS for the original discussion of this problem. It's not difficult to write a recursion for $E_n$ in terms of $E_{D_i},$ where $E_{D_i}$ is the expected number of steps given that we begin with precisely $(n-i)$ fixed points. However, the structure of each derangement plays a role as well, so the problem becomes extremely complicated, even for small values of $n.$
