How this calculation works
Find the last position left after repeatedly removing every kth person around a circle.
J(1)=0 and J(n)=(J(n−1)+k) mod nA worked example
Seven people and step three leave person four.
Good to know
Positions start at one. Counting starts at person one.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Find the last position left after repeatedly removing every kth person around a circle.
The primary result is labeled “Survivor position”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Positions start at one. Counting starts at person one.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
Seven people and step three leave person four.
Which rule does this calculator apply?
J(1)=0 and J(n)=(J(n−1)+k) mod n