Sarkovskii's theorem (or Sharkovsky's theorem) is a statement, named after Oleksandr Mikolaiovich Sharkovsky, about discrete dynamical systems on the real line. Suppose f : R -> R is a continuous function. We say that the number x is a periodic point of period m if f m(x) = x (where f m denotes the composition of m copies of f) and f k(x) ≠ x for all 0 < k < m. We are interested in the possible periods of periodic points of f. Consider the following ordering of the positive integers:
3 <= 5 <= 7 <= 9 <= ... <= 2·3 <= 2·5 <= 2·7 <= ... <= 22·3 <= 22·5 <= ..... <= 24 <= 23 <= 22 <= 2 <= 1.
We start with the odd numbers in increasing order, then 2 times the odds, 4 times the odds, etc., and at the end we put the powers of two in decreasing order. The statement of Sarkovskii's theorem is as follows:
If f has a periodic point of period m and m <= n in the above ordering, then f has also a periodic point of period n.
As a consequence, we see that if f has only finitely many periodic points, then they must all have periods which are powers of two. Furthermore, if there's a periodic point of period three, then there are periodic points of all other periods.

Sarkovskii's theorem does not state that there are stable cycles of those periods, just that there are cycles of those periods. For systems such as the logistic map, the bifurcation diagram shows a range of parameter values for which apparently the only cycle has period 3. In fact, there must be cycles of all periods there, but they are not stable and therefore not visible on the computer generated picture.

Interestingly, the above "Sarkovskii ordering" of the positive integers also occurs in a slightly different context in connection with the logistic map: the stable cycles appear in this order in the bifurcation diagram, starting with 1 and ending with 3, as the parameter is increased. (Here we ignore a stable cycle if a stable cycle of the same order has occurred earlier.)