login
A384989
Order of the permutation of [n] formed by a Josephus elimination variation: take 3, skip 1.
3
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, 95, 28, 90, 660, 30, 28, 30, 30, 546, 336, 48, 420, 24, 765, 1680, 60, 308, 400, 66, 462, 418, 4830, 252, 1430, 468, 49, 42, 180, 1020, 52, 2310, 264, 1680, 340, 380
OFFSET
1,5
COMMENTS
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.
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.
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.
A given element can be skipped or moved multiple times before reaching its final position.
LINKS
EXAMPLE
For n=11, the rotations to construct the permutation are
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
\------------------------/ 1st rotation
1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 4
\---------------/ 2nd rotation
1, 2, 3, 5, 6, 7, 9, 10, 11, 4, 8
\----/ 3rd rotation
1, 2, 3, 5, 6, 7, 9, 10, 11, 8, 4
The 3rd rotate is an example of an element (4) which was previously rotated to the end, being rotated to the end again.
This final permutation has order a(11) = 6 (applying it 6 times reaches the identity permutation again).
PROG
(Python)
from sympy.combinatorics import Permutation
def move_fourth(seq):
for i in range(3, len(seq), 3):
seq.append(seq.pop(i))
return seq
def a(n):
seq = list(range(n))
p = move_fourth(seq.copy())
return Permutation(p).order()
CROSSREFS
Cf. A051732 (Josephus elimination permutation order), A384753 (take 2 skip 1 Josephus variation).
Sequence in context: A296116 A017832 A255525 * A347713 A056880 A053273
KEYWORD
nonn
AUTHOR
Chuck Seggelin, Jun 14 2025
STATUS
approved