MathCastle
ChallengeSuperchallenge

Challenge · Superchallenge problem

3838 prisoners in the dungeon stand in a circle, numbered 11 to 3838. 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?