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.

A384753 Order of the permutation of {1,...,n} formed by a Josephus elimination variation: take 2, skip 1.

This page as a plain text file.
%I A384753 #29 Jun 14 2025 04:20:53
%S A384753 1,1,1,2,3,3,5,6,4,7,9,10,5,9,13,70,12,15,84,70,52,42,21,30,15,16,38,
%T A384753 84,168,24,90,360,120,27,24,72,30,108,286,276,105,4680,198,36,630,234,
%U A384753 120,2856,54,1056,532,660,51,310,406,54,420,120,55,264,150
%N A384753 Order of the permutation of {1,...,n} formed by a Josephus elimination variation: take 2, skip 1.
%C A384753 The Josephus elimination begins with a circular list {1,...,n} from which successively take 2 elements and skip 1, and the permutation is the elements taken in the order they're taken.
%C A384753 The same effect can be had by leaving remaining elements at the end of a flat list of {1,...,n} and applying the "skip" as a move (rotate) of the element at position 2*i+3 to the end of the list, for successive i >= 0.
%C A384753 Take 2 and move 1 is a move every 3rd element, but with the next 3 elements reckoned inclusive of the element which replaced the moved 1, and hence positions 2 apart.
%C A384753 A given element can be skipped or moved multiple times before reaching its final position.
%C A384753 The value of a(n) can vary sharply; for example, a(62) = 280, a(63) = 15939, a(64) = 210.
%e A384753 For n=10, the rotations to construct the permutation are
%e A384753     1, 2, 3, 4, 5, 6, 7, 8, 9, 10
%e A384753           \-----------------------/  1st rotation
%e A384753     1, 2, 4, 5, 6, 7, 8, 9, 10, 3
%e A384753                 \-----------------/  2nd rotation
%e A384753     1, 2, 4, 5, 7, 8, 9, 10, 3, 6
%e A384753                       \-----------/  3rd rotation
%e A384753     1, 2, 4, 5, 7, 8, 10, 3, 6, 9
%e A384753                              \----/  4th rotation
%e A384753     1, 2, 4, 5, 7, 8, 10, 3, 9, 6
%e A384753 The 4th rotate is an example of an element (6) which was previously rotated to the end, being rotated to the end again.
%e A384753 This final permutation has order a(10) = 7 (applying it 7 times reaches the identity permutation again).
%o A384753 (Python)
%o A384753 from sympy.combinatorics import Permutation
%o A384753 def move_third(seq):
%o A384753     for i in range(2,len(seq),2):
%o A384753         seq.append(seq.pop(i))
%o A384753     return seq
%o A384753 def a(n):
%o A384753     seq = list(range(n))
%o A384753     p = move_third(seq.copy())
%o A384753     return Permutation(p).order()
%Y A384753 Cf. A051732 (Josephus elimination permutation order).
%K A384753 nonn
%O A384753 1,4
%A A384753 _Chuck Seggelin_, Jun 09 2025