Define $f(n,s)$ as the maximum possible number of ones a turing machine with $2$ symbols can write down on an initially emtpy tape, if it has $n$ states and halts after at most $s$ steps.
Can we efficiently calculate $f(n,s)$ ?
The number can be calculated by just letting run all turing machines with $n$ states for $s$ steps (if they do not halt earlier). Can we do significantically better than brute force ?
I believe the answer is often $$f(n,s) = \min(n,s).$$
First of all, we have a simple upper bound: a machine that halts in $s$ steps can write at most $s$ ones, because it can write one symbol per step.
Next, the problem is making sure that the machine knows when to quit (knows when it has taken $s$ steps and should halt instead of continuing.) If we have $n\geq s$ states, we can keep count using the current state. There's a TM that always write a one, moves the head right, and increments its state-counter, stopping when it gets to the final state.
$$f(n,s) = s\quad\text{when }n\geq s$$
Next, let's consider machines that only ever move the tape head right. This makes sense as a special case, because this machine will never retrace its steps. (It will simply go forward, writing as many ones as possible in an uncomplicated way.) Because the machine never looks back, its only control structure comes from its $n$ states (not from the tape, where the tape head always points to a blank cell).
Hence such a TM either (1) halts after at most $n$ steps, or (2) loops forever. It loops forever in the second case because after $n$ steps, it must transition to a state it's already been in before. Because it's in an identical position (tape cell blank, current state previously visited) to an earlier position, it will loop forever.
$$f(n,s) = \min(n,s)\qquad\text{when }M\text{ only moves right.}$$