MathCastle
ChallengeSuperchallenge

Challenge · Superchallenge problem

5858 prisoners in the dungeon stand in a circle, numbered 11 to 5858. Starting with prisoner 22, every second prisoner still standing is released, going around the circle until one remains. What is the number of the last prisoner?