The sound is almost the same as the “International Urinal Choice Protocol” (ICUP), which Randall Munro wrote an excellent analysis, including a closed-loop equation and a graph of the optimal number of urinals. You should read his article before reading the rest of this answer.
In a post, Randall mentions:
[I] If you enter the bathroom with an uncomfortable amount of free urinals in a row, instead of taking one of them, you can walk one third from the line down. This will break the inconvenient line into two optimal lines, turning the worst case scenario into the best case.
Until he delves into more detail, he hints at what we are trying to do. If we have an uncomfortable amount of urinals (or stools in our case), we can try to put the first person in place so that they become the end of two different optimal subgroups.
Within 7 places, the main selection mode sets this:
1 _ _ 3 _ _ 2
Leaving four unoccupied places. But if instead we place the first person in third place, we will get the optimal 3 and 5 subgroups, increasing the number of possible passengers by one.
3 _ 1 _ 4 _ 2
For 25, the basic behavior is similarly non-optimal, which leads to the 9/25th filling before awkwardness:
1 _ _ 6 _ _ 4 _ _ 7 _ _ 3 _ _ 8 _ _ 5 _ _ 9 _ _ 2
But we can put someone in position 9, creating optimal 9 17 subgroups, for example:
3 _ 8 _ 5 _ 9 _ 1 _ 10 _ 6 _ 11 _ 4 _ 12 _ 7 _ 13 _ 2
Ensuring optimal employment 13/25th.
More generally, I believe that finding the largest optimal number is less than the number of places, and placing the first person there (in 25 cases 17, which is equivalent to the 9th from a different direction) will always maximize the number. In the worst case, for example 25, this is equivalent to ceil(n/3) , which Randall mentions.
In the middle case (neither the best nor the worst use of the basic seating behavior) we can always achieve 50% employment only by sitting in front of the first person, because we can create only one optimal subgroup, leaving the other less optimal. Therefore, we take the largest optimal subgroup in order to minimize the number of suboptimal spots. For example, for 20 places, we take 17 and create a group of 17 4, which optimizes as many places as possible, leaving only two lines empty:
2 _ 7 _ 4 _ 8 _ 3 _ 9 _ 5 _ 10 _ 1 _ _ 6
The four groups are actually technically the best and worst, but hopefully you can see how the template will scale.