Loading repovive.com/problems/math/8
There are n≥2 boxes in a row, numbered 1 through n from left to right. Initially, each box contains one token.
In each move, choose two adjacent boxes and transfer all tokens from the box containing more tokens into the other box. If their token counts are equal, either direction is allowed. Remove the empty box and close the gap.
Determine which of the original boxes can be the last remaining box.
You can write formulas in LaTeX or in plain text, and write your solution in any language.