# N people sit at a round table, starting from #1, every other one leaves, who's the last one?

For example, there are 10 people sitting there.

So the 1st round, such people leave: $$\#1, \#3, \#5, \#7, \#9$$ and remains $$\#2, \#4, \#6, \#8, \#10$$

Then the 2nd round, such people leave: $$\#2, \#6, \#10$$ and remains $$\#4, \#8$$

Then the 3rd round, such people leave: $$\#8$$ and remains $$\#4$$

so the last one remained is #4.

If we note f(10)=4, how to get a general formula for f(N)?

-
For a more general problem of the same kind, please see the Josephus Problem. –  André Nicolas Sep 26 '13 at 7:23
so there's no close form for the general case $k!=2$? –  athos Sep 26 '13 at 7:29
None that I know. There is one for $k=2$. –  André Nicolas Sep 26 '13 at 7:32
got it, thanks! :) –  athos Sep 26 '13 at 8:44