Let $n$ be a positive integer.
Consider an ordered set $S_n = [1,2,3,...,n]$ where the $j$ th element from the left equals $j$.
Now consider a function defined on $S_n$ as a permutation of that set.
$$ f(S_n) = P(S_n) $$
Now iterating the function $f$ means iteratively rearranging the set like the permution $f$ does.
In notation
$$f^m(S_n) = f( f^{m-1}(S_n)) = P ( f^{m-1}(S_n)) = P^m(S_n)$$
--
Let $f$ be a "good" function IFF it does not map any $a$ in $S_n$ to it same position.
Let $G(n,b) $ denote the cardinality of functions $f$ for $S_n$ such that $f,f^2,...f^b$ are all good functions.
What is known about $G(n,b)$ ?
Can it be given in closed form ?
Does it have an integral representation ?
I can not help thinking about binomial and euler numbers but im confused. Maybe this is wrong, maybe not.
This seems to me like a very simple question, so maybe the answer is very well known and the result is named ?