Direct formula for a variation of Josephus problem: What is the direct formula for the following variation of Josephus problem?


  There are $n$ persons, numbered $1$ to $n$, around a circle.. Starting from $k$-th person, every second person is eliminated. Given the $n$ and $k$, determine the index of the $x$-th person who is eliminated.


ADDED:In the first step the $k+1$th is eliminated.For n = 16,k = 6, elimination={7,9,...}

Thanks
If you go to the Wikipedia page, there is a reference at the bottom
I made a video very closely related to this question. There's a link to the video at: http://oeis.org/A006165