Solution (source code)

= Solution

A <periodic orbit> of least period $k$ is a list of distinct points $x_0,\ldots,x_{k-1}$ satisfying $f(x_i)=x_{i+1}$ for $i<k-1$ and $f(x_{k-1})=x_0$. Equivalently $f^k(x_0)=x_0$, with no smaller positive iterate fixing $x_0$. For $k=1$ this is a <fixed point>.