Suppose that we have a tape restricted to $n$ cells on binaryalphabet $\Sigma = \{0,1\}$ and initially filled with zeroes.
We want to build a Turing machine $M_n$ (or better a Linear Bounded Automata) that "prints" all the $2^n$ numbers on the tape, i.e. for all $x \in [0..2^{n-1}]$ there is a time $t_x$ during the computation in which the tape content is exactly $x$. Note that we can build an "optimized" Turing machine for every $n$.
At every step the head must move left or right.
What is the minimum number of steps $T(n)$ required?
We can easily see that $2^n-1 \leq T(n) \leq n 2^n$.
But how much can we "optimize" it?
For example for $n=3$ there is an optimal $2^n-1$ sequence:
t0: >0 0 0
t1: 1>0 0
t2: 1 1>0
t3: 1>1 1
t4: >1 0 1
t5: 0>0 1
t6: 0 1>1
t7: 0>1 0