cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A198788 #18 Jun 23 2020 14:34:00
%S A198788 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,
%T A198788 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,
%U A198788 7,4,1,3,3,5,1,3,2,2,1,13,9,7,5,8,1,5,3
%N 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.
%C A198788 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(k,n).
%C A198788 The main diagonal of the array (1, 1, 2, 2, 2, 4, 5, 4, ...) is A007495.
%C A198788 Consecutive columns down to the main diagonal (1, 2, 1, 3, 3, 2, 4, 1, 1, 2, ...) is A032434.
%C A198788 Period lengths of columns (1, 2, 6, 12, 60, 60, 420, 840, ...) is A003418.
%H A198788 William Rex Marshall, <a href="/A198788/b198788.txt">First 141 antidiagonals of array, flattened</a>
%H A198788 <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F A198788 T(k,1) = 1;
%F A198788 for n > 1: T(k,n) = ((T(k,n-1) + k - 1) mod n) + 1.
%e A198788 .k\n  1  2  3  4  5  6  7  8  9 10
%e A198788 ----------------------------------
%e A198788 .1 |  1  2  3  4  5  6  7  8  9 10  A000027
%e A198788 .2 |  1  1  3  1  3  5  7  1  3  5  A006257
%e A198788 .3 |  1  2  2  1  4  1  4  7  1  4  A054995
%e A198788 .4 |  1  1  2  2  1  5  2  6  1  5  A088333
%e A198788 .5 |  1  2  1  2  2  1  6  3  8  3  A181281
%e A198788 .6 |  1  1  1  3  4  4  3  1  7  3
%e A198788 .7 |  1  2  3  2  4  5  5  4  2  9  A178853
%e A198788 .8 |  1  1  3  3  1  3  4  4  3  1  A109630
%e A198788 .9 |  1  2  2  3  2  5  7  8  8  7
%e A198788 10 |  1  1  2  4  4  2  5  7  8  8
%Y A198788 Cf. A000027 (k = 1), A006257 (k = 2), A054995 (k = 3), A088333 (k = 4), A181281 (k = 5), A178853 (k = 7), A109630 (k = 8).
%Y A198788 Cf. A003418, A007495 (main diagonal), A032434, A198789, A198790.
%K A198788 nonn,easy,tabl
%O A198788 1,2
%A A198788 _William Rex Marshall_, Nov 21 2011