In Mancala, a player has a row of pits containing 0 or more seeds. At the end of the row is a section called the store. On a player's turn, they take all the seeds from a pit and sow them to the right, one seed per pit or store, until they have placed them all. If the last seed goes in the store, they go again.
Ordinarily, Mancala is a two-player game where each has a store.
For this puzzle, there is no opponent so the seeds cannot go past the store. As a consequence, pit A can never have more than 1 seed, pit B can never have more than 2 seeds, etc.
The question is for a given number of pits, n, what's the maximum number of seeds, S(n) that a player can start and with optimum play drop the last seed in the store with each move?
For example S(2)=3. In the diagram, B and A are the pits, and X is the store:
BAX
210
201
012
003
Derive a formula for S(n).
If a reasonable formula is not possible, try to give an approximation for large n.