The Josephus Problem asks where to start taking out every kth person in the circle consisted of n people, such that you are the last "survivor".
The following recursive formula is given: $$\begin{align} f(1,k)&=1, \\ f(n,k)&=((f(n-1,k)+k-1) \bmod n )+1. \end{align}$$
But this is not enough explanation, so I don't get where does it come from.
Can anyone help?