There are n people standing in a circle. Staring with person 2, every second person is eliminated until only 1 person survives. Who is the survivor?
Example: If n=7, people are killed in the order 2,4,6,1,5,3 and person 7 survives. If n=5, persons are killed in the order 2,4,1,5 and person 3 survives.
- via Wikipedia