Counting the number of fixpoint functions

138 Views Asked by At

The question I have follows like this.

A $periodic$ $point$ of a function is $f : X \rightarrow X$ is a point $x \in X$ for which there is a number $p$ (a period) with $f^p(x) = x$ ($f^p$ denotes the composite ($f\circ f\circ ...\circ f$) of $f$ with itself $p$ times).

A $fixpoint$ is a periodic point with minimal period $p = 1$, that is a point $x \in X$ such that $f(x) = x$.

For any set $X = \{1,2,...n \}$, how do we count the number of functions $f: X \rightarrow X$ such that each periodic point is a fixpoint.

Now, the only idea I have is using some sort of bijection to count, but I couldn't come up with anything concrete.