Solving Josephus’s Problem using recursion

Josephu’s problem is a violent, albeit a really interesting mathematics’ problem. According to Wikipedia, during the Jewish-Roman wars, a Jewish historian named Flavious Josephus and his 40 soldiers were trapped in a cave fighting the Roman soldiers. When they were about to be captured, they decided that they had rather die than laying down the