The Josephus Problem



Insipired by Peter Schumer's Journal Article "The Josephus Problem: Once More around".

Explanation:
This is a counting out game.
People are standing in a circle waiting to be executed. Counting begins at point 1 in the circle and proceeds around the circle in a clockwise direction. each person executing the person to their right.
The procedure is repeated with the remaining people, starting with the next person, going in the same direction until only one person remains and is freed.

An example of a game consisting of 8 people:

Image 1
Image 2
Image 3
Image 4
Image 5

In the example above, the game consists of 8 participants , and the winner was ultimately the person who was at position 1
So if the game had 8 participants , you would want to sit at position 1 before the game began, to live.


Objective:
The Objective is to try and figuire out what position you should sit at if the game had x number of participants , in order to be the last person to be executed and thus live.

hint: find the fomula

How to Play:
  1. Press Start
  2. the timer will start
  3. you will then be given an x number of participants
  4. enter the winning postion based on the number of participants given
  5. if you get the answer right, click "next question"
  6. if the answer is incorrect, the timer will keep running until you run out of time
  7. you will get a point for each correct answer
  8. refresh to start over ("restart" button is still needs to be programmed... a lot still needs to be done)
0:30
Start Restart

correct answer:

Points:

0

The Number of Participants is:

0

answer