TITLE: Expectation of period length of functions $f:\{1,\ldots,n\}\to \{1,\ldots,n\}$
QUESTION [5 upvotes]: For $n\in\mathbb{N}$, let $[n]:= \{1,\ldots,n\}$. Let $\text{Fun}(n)$ denote the set of all functions $f:[n]\to[n]$. To $f\in\text{Fun}(n)$ associate a sequence $\text{seq}(f))$ defined recursively by

$\text{seq}(f)_1 = f(1)$, and
$\text{seq}(f)_{k+1} = f(\text{seq}(f)_k)$ for all $k\in\mathbb{N}$.

Eventually $\text{seq}(f)$ will be periodic, and with $\text{per}(f)$ we denote the length of the period of $\text{seq}(f)$. By $E_n$ we denote the expected value of $\text{per}(f)$ for any $f\in\text{Fun}(n)$. Explicitly, we have $$E_n = \frac{1}{n^n}\sum_{f\in\text{Fun}(n)}\text{per}(f).$$
Questions. Do we have $\lim\sup_{n\to\infty} E_n/n > 0$, and if yes, what is that value? If no, do we have $\lim\sup_{n\to\infty} E_n/\log(n) > 0$?

REPLY [5 votes]: A standard reference for all sorts of average statistics of random maps of $\{1,\ldots,,N\}$ is Probability distributions related to random mappings, Bernard Harris, Ann. Math. Statist. 31 (1960), 1045-1062.