Josephus problem
N people stand in a circle and are numbered 1 to N. Starting from the first person, we skip him and shoot the next one, then we skip 3 and shoot person 4. we continue to do that in a circle - shoot one and skip the next until only one person is left. Depending on N, who will be the last standing man?
This is a specific case with an elegant solution to the famous Josephus Problem.
Comments