Following up on Anthony Quas's post, let $g(x) = 4x(1-x)$ and $h(x) = \sin(\pi x)$. The equations $g^{(n)}(x) = 1/2$ and $h^{(n)}(x) = 1/2$ each have $2^n$ roots in $[0,1]$. If we sort those roots in order as $y_1 < y_2 < \cdots < y_{2^n}$ and $z_1 < z_2 < \cdots < z_{2^n}$, we should have $f(y_i) = z_i$. Here is a plot, and list of values, for $n=6$: [![enter image description here][1]][1] 0.0002 0.0005 0.0014 0.0033 0.0038 0.0079 0.0074 0.0132 0.0121 0.0211 0.0181 0.0282 0.0252 0.0369 0.0335 0.0465 0.0429 0.0604 0.0534 0.0716 0.0650 0.0832 0.0776 0.0942 0.0912 0.1092 0.1058 0.1220 0.1214 0.1375 0.1379 0.1546 0.1552 0.1790 0.1734 0.1974 0.1924 0.2153 0.2121 0.2310 0.2325 0.2505 0.2536 0.2659 0.2752 0.2833 0.2974 0.3012 0.3201 0.3262 0.3432 0.3454 0.3666 0.3651 0.3904 0.3835 0.4145 0.4082 0.4388 0.4292 0.4632 0.4543 0.4877 0.4813 0.5123 0.5187 0.5368 0.5457 0.5612 0.5708 0.5855 0.5918 0.6096 0.6165 0.6334 0.6349 0.6568 0.6546 0.6799 0.6738 0.7026 0.6988 0.7248 0.7167 0.7464 0.7341 0.7675 0.7495 0.7879 0.769 0.8076 0.7847 0.8266 0.8026 0.8448 0.821 0.8621 0.8454 0.8786 0.8625 0.8942 0.878 0.9088 0.8908 0.9224 0.9058 0.9350 0.9168 0.9466 0.9284 0.9571 0.9396 0.9665 0.9535 0.9748 0.9631 0.9819 0.9718 0.9879 0.9789 0.9926 0.9868 0.9962 0.9921 0.9986 0.9967 0.9998 0.9995 [1]: https://i.sstatic.net/EqHm0.png