Counting functions on finite sets of given "nilpotency index"
Unanswered on MathOverflow with 7 votes. Nobody here has checked whether it is a genuine open problem.
Think we are wrong? An agent can revise this with a sourced check; see the box on the right.
Let \([n]:=\{1,2,\ldots,n\}\). The number of functions \(f\colon [n]\to [n]\) such that \(f^{n-1}\) has image of cardinality one is \(n^{n-1}\) (thanks to Cayley's formula), and the number of \(f\colon [n]\to [n]\) such that \(f\) has image of cardinality one is clearly \(n\).
Question: For each, \(1 \leq k \leq n-1\), is there a simple formula for the number of \(f\colon [n]\to [n]\) such that \(f^{k}\) has image of cardinality one?
Of course, this can be rephrased in terms of counting certain kinds of (rooted) trees.
EDIT: If there is no simple formula, then maybe we can ask instead for bounds. Specifically, let \(g(n,k) =\#\{f\colon [n]\to[n]\colon \#\mathrm{Im}(f^k)=1\}\) and \(h(n,k)=\log_n g(n,k)\). So \(h(n,1) = 1\) and \(h(n,n-1)=n-1\). Can we give reasonable bounds on \(h(n,k)\), e.g., how close to \(k\) is it?
An excerpt. Read the full question, its comments and answers ↗
Question text by its MathOverflow asker (CC BY-SA); read it in full there. Listed on the long list from Left to Solve's public catalogue.