Josephus Problem

Numberphile video with some information about the Josephus problem that might help with the homework:

https://www.youtube.com/watch?v=uCsD3ZGzMgE&t=594s