What is the distribution of cycle lengths in derangements? In particular, expected longest cycle. There is a lot of information about expected cycle lengths in random permutations, but I'm having trouble adapting the arguments and calculations to the specific case of derangements - permutations in which no item is fixed.
I feel like the answers should be similar, but I'm not entirely convinced.  In particular, what is the distribution of the longest cycle.  Experiments are giving me results I don't believe, that the mode is about N/2, it ramps up nicely to that, then falls off almost linearly.
In short, I'm having trouble understanding the existing literature, and would appreciate help and pointers in seeing the calculations adapted to this case.
Many thanks.
 A: Yes, the answers are similar. The number of permutations with given maximal cycle length can be calculated recursively (see the general formula for $L_{k,n}$ in On the number of permutations of $n$ objects with greatest cycle length $k$, S.W. Golomb and P. Gaal, p. $211$–$218$ in Probabilistic Methods in Discrete Mathematics, V. F. Kolchin et al. (eds.)). The recursion counts the configurations of the longest cycle(s) and then multiplies by the number of permutations of the remaining elements.
If we do the same thing for derangements, the configurations of the large cycles are the same, and for large $N$, the number of remaining elements will almost always be large enough that we can approximate the number of their derangements by $1/\mathrm e$ times the number of their permutations. Thus, in most cases, the number of derangements with a given maximal cycle length is roughly $1/\mathrm e$ times the number of permutations with that maximal cycle length, and since the total number of derangements is also roughly $1/\mathrm e$ times the total number of permutations, this factor cancels in the distribution, which is thus approximately identical to the one for permutations.
The only cases where this breaks down are the ones with maximal cycle length almost $N$, since in that case few elements are left to permute. The most extreme exception is the maximal cycle length $N$, for which all permutations (as opposed to roughly $1/\mathrm e$ of them) are derangements, so that at this point the distribution has roughly $\mathrm e$ times the value it has for permutations.
Here are two images that show the counts and distributions, respectively, for permutations (red) and derangements (green) for $N=630$. Here's the code I used to produce them, based on the above recursion. (The modification for derangements is a single line in the code where the initial values of the recursion for maximal cycle length $1$ are modified.) In the first image, which shows the counts, you can see at the very right that the last few green dots scatter around the continuation of the $N!/(k\mathrm e)$ curve, and the very last green dot is on top of the red $N!/k$ curve. In the second image, which shows the distributions, you can see that these are practically identical and the green one appreciably deviates from the $1/k$ curve only for the last few values.


