Iterating a periodic function I'm curious about what happens if you iterate a function that is periodic. What happens to the period? For example, consider iterating a function like $\sin(x)$ or $\tan(x)$ several times. It should still have period $2\pi$, but will that be its prime period, or can the period become shorter with repeated iteration?

It shouldn't take too much imagination to write down a continuous function $f : \mathbb{R} \to \mathbb{R}$ such that


*

*The range of $f$ is contained in $[0,1]$

*$f$ is constant on $[0,1]$

*The prime period of $f$ is $2$.


What happens to $f \circ f$ in this case? 
