This is based on an older question.
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)$ and ''starting value'' $s\in [n]$ we associate a sequence $\text{seq}(f,s))$ defined recursively by
- $\text{seq}(f,s)_1 = f(s)$, and
- $\text{seq}(f,s)_{k+1} = f(\text{seq}(f,s)_k)$ for all $k\in\mathbb{N}$.
Eventually $\text{seq}(f,s)$ will be periodic, and with $\text{per}(f,s)$ we denote the length of the period of $\text{seq}(f,s)$. By $\text{maxper}(f)$ we denote the maximum period for any starting value, that is $$\text{maxper}(f) = \max\{\text{per}(f, s): s\in[n]\}.$$ By $E_n$ we denote the expected value of $\text{maxper}(f)$ for any $f\in\text{Fun}(n)$. Explicitly, we have $$E_n = \frac{1}{n^n}\sum_{f\in\text{Fun}(n)}\text{maxper}(f).$$
Questions. What is the value of $\lim\sup_{n\to\infty} E_n/n$?