OFFSET
1,2
COMMENTS
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).
LINKS
William Rex Marshall, Rows n = 1..10, flattened
FORMULA
T(1,1) = 1;
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.
EXAMPLE
n\k 1 2 3 4 5 6 7 8 9 10 11 12
---------------------------------------
1 | 1
2 | 2 1
3 | 3 3 2 2 1 1
4 | 4 1 1 2 2 3 2 3 3 4 4 1
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
William Rex Marshall, Nov 21 2011
STATUS
approved