A historian survived a suicide pact by working out where to stand
During the Jewish–Roman War in 67 AD, the historian Flavius Josephus and 40 companions trapped in a cave reportedly agreed that rather than surrender, they'd stand in a circle and kill every third remaining person until only one was left, who would take his own life. If you're one of 41 people in that circle, which position do you take to end up among the last ones standing?
Reveal the answer
Position 16 or 31. Counting off by three around a circle of 41 and removing every third person leaves exactly two survivors, at those two positions. Josephus, so the story goes, worked out a safe spot and talked his last surviving companion into surrendering instead of following through. The general version of this puzzle — for any group size and any counting interval — is now called the Josephus problem, a staple exercise in computer science courses on recursion.
— Flavius Josephus, The Jewish War — c. 75 AD — public domain
Go deeper: get the book →