There are 1000 people standing in a row. They are numbered as 1,2,...,1000. There is a unique demon who eats only the persons which are standing on odd positions. It means that after his first round the person numbered 2 will come at position 1 and the one at 4 will come at 2 and so on. So what was the number assigned to the person which is left at last ?

1 answer

A little investigation should convince you that for n people, the person numbered 2^k will be left standing, where k is the largest number such that

2^k <= n