

A198788


Array T(k,n) read by descending antidiagonals: Last survivor positions in Josephus problem for n numbers and a count of k, n >= 1, k >= 1.


4



1, 2, 1, 3, 1, 1, 4, 3, 2, 1, 5, 1, 2, 1, 1, 6, 3, 1, 2, 2, 1, 7, 5, 4, 2, 1, 1, 1, 8, 7, 1, 1, 2, 1, 2, 1, 9, 1, 4, 5, 2, 3, 3, 1, 1, 10, 3, 7, 2, 1, 4, 2, 3, 2, 1, 11, 5, 1, 6, 6, 4, 4, 3, 2, 1, 1, 12, 7, 4, 1, 3, 3, 5, 1, 3, 2, 2, 1, 13, 9, 7, 5, 8, 1, 5, 3
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Arrange 1, 2, 3, ... n clockwise in a circle. Starting the count at 1, delete every kth integer clockwise until only one remains, which is T(k,n).
The main diagonal of the array (1, 1, 2, 2, 2, 4, 5, 4, ...) is A007495.
Consecutive columns down to the main diagonal (1, 2, 1, 3, 3, 2, 4, 1, 1, 2, ...) is A032434.
Period lengths of columns (1, 2, 6, 12, 60, 60, 420, 840, ...) is A003418.


LINKS



FORMULA

T(k,1) = 1;
for n > 1: T(k,n) = ((T(k,n1) + k  1) mod n) + 1.


EXAMPLE

.k\n 1 2 3 4 5 6 7 8 9 10

.6  1 1 1 3 4 4 3 1 7 3
.9  1 2 2 3 2 5 7 8 8 7
10  1 1 2 4 4 2 5 7 8 8


CROSSREFS



KEYWORD



AUTHOR



STATUS

approved



