Functional iteration and the Josephus problem.
01 May 1991
The problem of Josephus is the following. We are given two positive integers n, q. There are n places arranged around a circle, and numbered clockwise 1,2,...,n. Each of the n people takes one of the places, then every qth one is executed, until just one remains. One question is this: if you would like to be the last survivor, then into what place should you go initially? We denote the answer to this question by J sub q(n). For example, if n=5 and q=2, the order of execution is 2,4,1,5,3, and J sub2(5)=3.