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 A384184 #72 Jun 23 2025 22:11:41 %S A384184 1,2,1,4,2,2,2,8,3,4,5,4,6,4,6,16,4,6,9,8,4,10,28,8,10,12,9,8,14,12, %T A384184 12,32,5,8,70,12,18,18,24,16,10,8,7,20,210,56,126,16,110,20,60,24,26, %U A384184 18,120,16,9,28,29,24,30,24,60,64,6,10,33,16 %N A384184 Order of the permutation of {0,...,n-1} formed by successively swapping elements at i and 2*i mod n, for i = 0,...,n-1. %C A384184 a(2*n) = 2*a(n) since the cycle lengths of the permutation with size 2*n is effectively that of size n twice, doubled. Thus, the LCM/order is doubled. %H A384184 Mia Boudreau, <a href="/A384184/b384184.txt">Table of n, a(n) for n = 1..10000</a> %H A384184 Mia Boudreau, <a href="https://github.com/miabea73/MiaOEIS/tree/main/A384184">Java program, GitHub</a> %F A384184 a(2*n) = 2*a(n). %F A384184 a(2^n) = 2^n. %F A384184 Conjecture: a(2^n + 2^x) = 2^n * (x-n) if x > n. %F A384184 a(2^n - 1) = A003418(n-1). %F A384184 s(2^n + 1) = A000027(n). %F A384184 a(2*n - 1) = A051732(n). %F A384184 a(A004626(n)) % 2 = 1. %F A384184 a(A065119(n)) = n/3. %F A384184 a(A001122(n)) = (n-1) / 2. %F A384184 a(A155072(n)) = (n-1) / 4. %F A384184 a(A001133(n)) = (n-1) / 6. %F A384184 a(A001134(n)) = (n-1) / 8. %F A384184 a(A001135(n)) = (n-1) / 10. %F A384184 a(A225759(n)) = (n-1) / 16. %e A384184 For n = 11, the permutation is {0,3,4,7,8,1,2,9,10,5,6} and it has order a(11) = 5. %o A384184 (Python) %o A384184 from sympy.combinatorics import Permutation %o A384184 def a(n): %o A384184 L = list(range(n)) %o A384184 for i in range(n): %o A384184 if (j:= (i << 1) % n) != i: %o A384184 L[i],L[j] = L[j],L[i] %o A384184 return Permutation(L).order() # _DarĂo Clavijo_, Jun 05 2025 %Y A384184 Cf. A003418, A000027, A051732, A004626, A065119, A001122, A155072, A001133, A001134, A001135, A225759. %K A384184 nonn %O A384184 1,2 %A A384184 _Mia Boudreau_, May 29 2025