## Josephus Problem

Given a group of men arranged in a Circle under the edict that every th man will be executed going around the Circle until only one remains, find the position in which you should stand in order to be the last survivor (Ball and Coxeter 1987). The original problem consisted of a Circle of 41 men with every third man killed (, ). In order for the lives of the last two men to be spared, they must be placed at positions 31 (last) and 16 (second-to-last).

The following array gives the original position of the last survivor out of a group of , 2, ..., if every th man is killed:

(Sloane's A032434). The survivor for can be given analytically by

where is the Floor Function and Lg is the Logarithm to base 2. The first few solutions are therefore 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 9, 11, 13, 15, 1, ... (Sloane's A006257).

Mott-Smith (1954) discusses a card game called Out and Under'' in which cards at the top of a deck are alternately discarded and placed at the bottom. This is a Josephus problem with parameter , and Mott-Smith hints at the above closed-form solution.

The original position of the second-to-last survivor is given in the following table for , 3, ...:

(Sloane's A032435).

Another version of the problem considers a Circle of two groups (say, A'' and B'') of 15 men each, with every ninth man cast overboard. To save all the members of the A'' group, the men must be placed at positions 1, 2, 3, 4, 10, 11, 13, 14, 15, 17, 20, 21, 25, 28, 29, giving the ordering

which can be remembered with the aid of the Mnemonic From numbers' aid and art, never will fame depart.'' Consider the vowels only, assign , , , , , and alternately add a number of letters corresponding to a vowel value, so 4A (o), 5B (u), 2A (e), etc. (Ball and Coxeter 1987).

If every tenth man is instead thrown overboard, the men from the A'' group must be placed in positions 1, 2, 4, 5, 6, 12, 13, 16, 17, 18, 19, 21, 25, 28, 29, giving the sequence

which can be constructed using the Mnemonic Rex paphi cum gente bona dat signa serena'' (Ball and Coxeter 1987).

References

Bachet, C. G. Problem 23 in Problèmes plaisans et délectables, 2nd ed. p. 174, 1624.

Ball, W. W. R. and Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, pp. 32-36, 1987.

Kraitchik, M. Josephus' Problem.'' §3.13 in Mathematical Recreations. New York: W. W. Norton, pp. 93-94, 1942.

Mott-Smith, G. Mathematical Puzzles for Beginners and Enthusiasts. New York: Dover, 1954.

Sloane, N. J. A. Sequences A006257/M2216, A032434, and A032435 in An On-Line Version of the Encyclopedia of Integer Sequences.'' http://www.research.att.com/~njas/sequences/eisonline.html.