Classic problem found in introductory books on combinatorics.

Explained quite well in an article by Rick Regan. Also see the Wikipedia article and Wolfram's page.

Sloane A032434 contains the list of survivors given by the formula $latex 1 + 2n - 2^{1 + \lfloor\lg n floor}$ where $latex \lfloor n floor$ is the floor function and $latex \lg$ is the logarithm in base 2. The first few members of the sequence are 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 9, 11, 13, 15, 1.

© Copyright 2008—2017, Gurmeet Manku.

Send me email or a
Sarahah message!