login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209258 The original Josephus problem: 41 soldiers are arranged in a ring, and every third man is killed by his neighbor, until only the last person remains, who would kill himself. Sequence shows soldier killing order. 0
3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 1, 5, 10, 14, 19, 23, 28, 32, 37, 41, 7, 13, 20, 26, 34, 40, 8, 17, 29, 38, 11, 25, 2, 22, 4, 35, 16, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Josephus and another soldier did not agree with that proposal. By choosing positions 31 and 16 in the ring, Josephus and his companion saved their lives.
As a mathematics problem, the classic "Josephus problem" assumes that the soldiers arranged themselves in a circle and counted by threes to determine the order in which they would be killed, and the comment above assumes that Josephus and the one other survivor deliberately placed themselves in the two positions that would make them the last two survivors, but neither of these assumptions is supported by the account of Josephus himself (see the quote at the Links entry). - Jon E. Schoenfield, Jun 04 2017
LINKS
Wikipedia, Josephus problem.
MATHEMATICA
Needs["Combinatorica`"]
InversePermutation@Josephus[41, 3]
lst = {}; r = 41; s = Range[r]; Do[s = RotateLeft[s, 2]; AppendTo[lst, First[s]]; s = Rest[s], {r}]; lst
CROSSREFS
Cf. A054995.
Sequence in context: A342831 A161351 A328168 * A337244 A366847 A031193
KEYWORD
easy,fini,full,nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 28 19:04 EDT 2024. Contains 375508 sequences. (Running on oeis4.)