Finding $f$ such that $f(f(f(f...(x)))) = x$
Solution 1:
There are no monotone solution for odd $n$ other then $f_n(x) = x$. There are also no continuous solutions as any continuous injection is monotone.
There are many discontinuous solutions for any $n$. Represent any real number $x$ as $x = \lfloor x \rfloor + \{x\}$ (integer and floor part), so we now have bijection $\mathbb{R} \leftrightarrow [0, 1) \times \mathbb{Z}$. Choose your favorite bijection $g_n: \mathbb Z \leftrightarrow \mathbb Z$ of order $n$ - for example, $g_n(i) = (i + 1) \mod n + \lfloor\frac i n\rfloor$ - split $\mathbb{Z}$ into segments of length $n$ and rotate any segment. Now define $f_n(x) = \{x\} + g_n(\lfloor x \rfloor)$. It's even continuous everywhere but in points $n - 1 + kn$.
(for simplicity, I'll denote $f^n$ to be $n$-th iteration of $f$ - we will not need powers here)
The only continuous solutions are involutions - answer you linked can be extended to proof it. $f$ have to be monotonic - if it isn't - say we have $f(x) > f(y) > f(z)$ while $x > z > y$ - then it's not injective, as there is point in $q \in [z, x]$ s.t. $f(q) = f(y)$, so we will have $f^n(q) = f^n(y)$ but $q \neq y$.
If $f$ is strictly increasing, then $f(x) = x$ by @Najib's argument.
If $f$ is strictly decreasing, then $f$ has a single fixed point $x_0$. We have $f(x_0 + a) < f(x_0) = x_0$ and $f(x_0 - a) > f(x_0) = x_0$ for positive $a$. $g =f\circ f$ is continuous and injective - so monotonic. As $f(x_0 + 1) < f(x_0)$, we have $f(f(x_0 + 1)) > x_0$, so $g$ is increasing. If $g(x) \neq x$ for some $x$, we will again have $f^n(x) \neq x$. So $g(x) = x$. And thus $f$ is involution.