With n people numbered 1 to n in a circle, every second one is eliminated until only one survives. For example, for n=10, the elimination order is 2 4 6 8 10 3 7 1 9, so 5 survives. The problem: Determine the survivor's number J(n).
[I claim no credit for this problem; I first saw it posed by J expert Eugene E. McDonnell, nor for the answer in J programming language that I will divulge but did not discover. Credit goes to J co-inventor & all round genius Roger Hui. I hope this method of presenting a problem is OK. If not I'll withdraw it.]