Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Jun 23 2020 05:03:31
%S 1,2,1,3,3,2,2,1,1,4,1,1,2,2,3,2,3,3,4,4,1,5,3,4,1,2,4,4,1,2,4,5,3,2,
%T 5,1,3,4,1,1,3,4,1,2,5,4,2,3,5,1,3,3,5,1,3,4,2,1,4,5,2,3,5,5,2,3,5,1,
%U 4,3,1,2,4,5,2,2,4,5,2,3,1,6,5,1,5,1,4
%N Irregular table T(n,k) read by rows: Last survivor positions in Josephus problem for n numbers and a count of k, n >= 1, lcm(1, 2, 3, ..., n) >= k >= 1.
%C Arrange 1, 2, 3, ... n clockwise in a circle. Starting the count at 1, delete every k-th integer clockwise until only one remains, which is T(n,k).
%C In the full table in A198789, row n repeats with a periodicity of lcm(1, 2, 3, ..., n) = A003418(n). This sequence is a scan of each row in A198789 for exactly one period length.
%H William Rex Marshall, <a href="/A198790/b198790.txt">Rows n = 1..10, flattened</a>
%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F T(1,1) = 1;
%F for n >= 2, lcm(1, 2, ... n) >= k >=1: T(n,k) = ((T(n-1,((k-1) mod lcm(1, 2, ... n-1)) + 1) + k - 1) mod n) + 1.
%e n\k 1 2 3 4 5 6 7 8 9 10 11 12
%e ---------------------------------------
%e 1 | 1
%e 2 | 2 1
%e 3 | 3 3 2 2 1 1
%e 4 | 4 1 1 2 2 3 2 3 3 4 4 1
%Y Cf. A003418, A007495, A032434, A198788, A198789.
%K nonn,easy,tabf
%O 1,2
%A _William Rex Marshall_, Nov 21 2011