Forty-one in a circle, every second one out: number 19 lives

Write 41 as 32 + 9 and the survivor is 2 × 9 + 1, without counting anyone out.

Arithmetic and functions · Level: Classic result · Updated on 2026-11-10

Forty-one people stand in a ring and every second one steps out, round and round, until one remains. Where should you stand? The answer needs one subtraction: take the largest power of two not exceeding 41, which is 32, and double what is left over and add one. 41 − 32 = 9, and 2 × 9 + 1 = 19. The first link does the whole thing in one line, the second prints 2⁵ = 32, and the third prints the remainder 9 that the formula feeds on. The reason powers of two appear is that one round of the counting halves the circle exactly, and the survivor is whatever the odd person is when the circle has been cut down to a size the pattern can carry.

The story in Josephus is not this game. He and forty fellow soldiers are said to have been trapped in a cave in 67 CE and to have agreed to kill themselves by counting off rather than surrender; Josephus, according to the account, arranged the count so that he was left. With every third person leaving instead of every second, the last man standing among 41 is number 31, which is the number the sources quote. The k = 2 version is the one that yields to a one-line formula, and it recurs in textbooks precisely because 41 is a small enough input to check by hand and large enough that the answer is not obvious — 19 is a hard guess and an easy verification.

Answer

19

How to read it

2·(41 − 2⁵) + 1 on the workbench. The second link is the power of two the formula subtracts, the third the remainder it doubles.

Source

Flavius Josephus, The Jewish War III, on the siege of Jotapata in 67 CE; the counting-out game named after him has the closed form J(n) = 2(n − 2^⌊log₂ n⌋) + 1 when every second person leaves the circle

Work it in the calculator

These links open the right calculator with this problem's numbers already typed in. The line above is what the screen should show — check it yourself.

This is an independent third-party tool site. It is not affiliated with, sponsored by, or authorised by Casio, Texas Instruments or their distributors. Model names and product names are trademarks of their respective owners and appear here only to identify devices.

The keystroke sequences in these manuals were written from this site's own layout data — the same data the online calculator renders — plus publicly available product facts. Specifications and regional configurations are confirmed against the physical device and the manufacturer's most recent material.