Dynamical Systems problem -- a function of ONLY period 3 I am trying to construct an example of a function $f: [0,1] \rightarrow [0,1]$ such that it has a periodic point of period 3 and NO other periodic points. 
Any ideas? how can I even start envisioning this? I am pretty sure $f$ cannot be continuous, but how do I ensure the existence of just the periodic point with period 3?
 A: By Sharkovs’kiǐ’s theorem the function $f$ cannot be continuous, as you suspected. One simple approach is to let $\{x_\xi:\xi<2^\omega\}$ be an enumeration of $[0,1]$ and define
$$f:[0,1]\to[0,1]:x\mapsto\begin{cases}
x_1,&\text{if }x=x_0\\
x_2,&\text{if }x=x_1\\
x_0,&\text{if }x=x_2\\
x_{\xi+1},&\text{if }x\notin\{x_0,x_1,x_2\}\;.
\end{cases}$$
The orbit of each point of $[0,1]\setminus\{x_0,x_1,x_2\}$ is infinite, so there are no periodic points except $x_0,x_1$, and $x_2$. (Once you have one point with period $3$, you must of course have three such points, since the other two points in its orbit will also have period $3$.)
The enumeration of course uses the axiom of choice. You can avoid this while still using the same basic idea, but it takes more work. It’s well known that each irrational $x\in[0,1]$ has a unique continued fraction expansion $x=[0;a_1,a_2,\dots]$. It’s also well known that there is an effective enumeration $\{q_n:n\in\Bbb N\}$ of the rationals in $[0,1]$. Define $f:[0,1]\to[0,1]$ as follows:
$$\begin{align*}
&f(q_0)=q_1\\
&f(q_1)=q_2\\
&f(q_2)=q_0\\
&f(q_n)=q_{n+1}\text{ for all }n\ge 3\\
&f\big([0;a_1,a_2,a_3,\dots]\big)=[0;a_1+1,a_2+1,a_3+1,\dots]\;.
\end{align*}$$
Added: This paper by Bau-Sen Du is, according to the title, A collection of simple proofs of Sharkovsky's theorem.
A: The typical example of such a function is a rotación of the circle of angle $2\pi/3$. This suggests the following:
$$
f(x)=x+\frac13\mod1.
$$
All points are of minimal period three.
A: Let $f(a)=b$, $f(b)=c$, $f(c)=a$, where $b\ne a$. What is $f(f(f(b)))$? 
But presumably the question should be reworded to rule out this sort of example. 
