Question 58
Let $X$ be the set of all bijective functions from the set $S = \{1, 2, 3, ..., n\}$ to itself. For each $f \in X$, define
$$
T_f(j) = \begin{cases} 1, & \text{if } f^{(12)}(j) = j, \\ 0, & \text{otherwise.} \end{cases}
$$
Determine
$$ \sum_{f \in X} \sum_{j=1}^{n} T_f(j). $$
(Here $f^{(k)}(x) = f(f^{(k-1)}(x))$ for $k \ge 2$.)
$$
T_f(j) = \begin{cases} 1, & \text{if } f^{(12)}(j) = j, \\ 0, & \text{otherwise.} \end{cases}
$$
Determine
$$ \sum_{f \in X} \sum_{j=1}^{n} T_f(j). $$
(Here $f^{(k)}(x) = f(f^{(k-1)}(x))$ for $k \ge 2$.)