I recently came across Sharkovskii's Theorem which asserts that if $f:\mathbb{R} \to \mathbb{R}$ is continuous and has a cycle of length $m$, then $f$ has a cycle of length $n$ for any $n$ which comes after $m$ in the following ordering:
$3 < 5 < 7 < 9 < ...$ $ < 2\cdot3 < 2\cdot5 < 2\cdot7 < 2 \cdot 9 < ...$ $...$ $ < 2^n\cdot3 < 2^n\cdot5 < 2^n\cdot7 < 2^n \cdot 9 < ...$ $...$ $... < 2^n < 2^{n-1} < ... <2 < 1$
I was wondering how strongly this theorem depends on the structure of the underlying topological space? For example, the theorem is clearly not true in any discrete space, but it is true for a closed interval. Does anyone know of a fairly general set of a criteria a topological space $X$ must meet for a Sharkovskii-type result to hold for continuous functions $f:X\to X$?
Thanks in advance.