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.
%I A384989 #11 Jun 19 2025 18:34:33 %S A384989 1,1,1,1,2,3,4,4,6,10,6,8,12,11,9,10,42,15,16,52,60,120,18,30,140,99, %T A384989 95,28,90,660,30,28,30,30,546,336,48,420,24,765,1680,60,308,400,66, %U A384989 462,418,4830,252,1430,468,49,42,180,1020,52,2310,264,1680,340,380 %N A384989 Order of the permutation of [n] formed by a Josephus elimination variation: take 3, skip 1. %C A384989 The Josephus elimination begins with a circular list [n] from which successively take 3 elements and skip 1, and the permutation is the elements taken in the order they're taken. %C A384989 The same effect can be had by leaving remaining elements at the end of a flat list of [n] and applying the "skip" as a move (rotate) of the element at position 3*i+4 to the end of the list, for successive i >= 0. %C A384989 Take 3 and move 1 is a move every 4th element, but with the next 4 elements reckoned inclusive of the element which replaced the moved 1, and hence positions 3 apart. %C A384989 A given element can be skipped or moved multiple times before reaching its final position. %H A384989 Chuck Seggelin, <a href="/A384989/b384989.txt">Table of n, a(n) for n = 1..1000</a> %e A384989 For n=11, the rotations to construct the permutation are %e A384989 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 %e A384989 \------------------------/ 1st rotation %e A384989 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 4 %e A384989 \---------------/ 2nd rotation %e A384989 1, 2, 3, 5, 6, 7, 9, 10, 11, 4, 8 %e A384989 \----/ 3rd rotation %e A384989 1, 2, 3, 5, 6, 7, 9, 10, 11, 8, 4 %e A384989 The 3rd rotate is an example of an element (4) which was previously rotated to the end, being rotated to the end again. %e A384989 This final permutation has order a(11) = 6 (applying it 6 times reaches the identity permutation again). %o A384989 (Python) %o A384989 from sympy.combinatorics import Permutation %o A384989 def move_fourth(seq): %o A384989 for i in range(3,len(seq),3): %o A384989 seq.append(seq.pop(i)) %o A384989 return seq %o A384989 def a(n): %o A384989 seq = list(range(n)) %o A384989 p = move_fourth(seq.copy()) %o A384989 return Permutation(p).order() %Y A384989 Cf. A051732 (Josephus elimination permutation order), A384753 (take 2 skip 1 Josephus variation). %K A384989 nonn %O A384989 1,5 %A A384989 _Chuck Seggelin_, Jun 14 2025