It looks like a cruel game that can only be solved by simulating eliminations one by one. But the circle has binary memory: when the even positions disappear, the problem starts over under another name.
The Josephus Circle
Riddle statement
There are 41 people arranged in a circle, numbered from 1 to 41.
We start with person 1.
Person 1 is spared for now, person 2 is eliminated, person 3 is spared for now, person 4 is eliminated, and so on around the circle: one person is spared, the next is eliminated.
The process continues until only one person remains.
In which position should you stand to survive?
Show solution
Solution
The safe position is 19.
The idea is not to simulate all 40 eliminations, but to look at how the circle is renamed after each pass.
Let $J(n)$ be the surviving position with $n$ people when the first is spared, the second is eliminated, the third is spared, the fourth is eliminated, and so on.
If $n=2m$ is even, the first pass eliminates all even positions:
The odd positions remain:
The same game continues on those $m$ positions. If position $J(m)$ survives in the reduced circle, then in the original circle it corresponds to:
Therefore:
If $n=2m+1$ is odd, the first pass again eliminates all even positions, but after sparing position $2m+1$, the next eliminated position is 1. The remaining positions are:
The game starts over on $m$ positions. If position $J(m)$ survives in the reduced circle, then in the original circle it corresponds to:
So:
Now apply this to 41:
We need $J(20)$. Since:
we get:
Finally:
The compact formula says the same thing: if $n=2^m+\ell$, with $0\leq\ell<2^m$, then:
Since:
we get:
Answer: you should stand in position 19.