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 A119980 #35 Feb 01 2024 02:30:34 %S A119980 1,3,6,6,11,15,52,38,51,9,360,260,35,39,364,1932,680,532,1122,260, %T A119980 2415,3570,168,360,71,12285,836,12,1680,1155,858,936,7956,48300, %U A119980 171120,234,4428,235752,712,990,119,364182,406,11220,412920,25584,476,19998,6486 %N A119980 Order of the following permutation on 3n+1 symbols. Write the 3n+1 symbols horizontally into a 3-column grid and read them off vertically, i.e., column after column. %H A119980 Andrew Howroyd, <a href="/A119980/b119980.txt">Table of n, a(n) for n = 0..1000</a> %e A119980 For n=2, the grid with 0..6 by rows is %e A119980 0 1 2 %e A119980 3 4 5 first column is one longer %e A119980 6 %e A119980 Reading them by columns gives (0,3,6,1,4,2,5) which as a permutation has order 6, so a(2) = 6. %o A119980 (GAP) # GAP / KANT / KASH %o A119980 # SpartaEncrypt(d,L) returns the list M obtained by writing L in d columns %o A119980 # and then concatenating these columns %o A119980 SpartaEncrypt := function(d,L) %o A119980 local len, i, M; %o A119980 len := Length(L); %o A119980 M := []; %o A119980 for i in [1..d] do %o A119980 Append(M,L{[i,d+i..d*IntQuo(len-i,d)+i]}); %o A119980 od; %o A119980 return M; %o A119980 end; %o A119980 # SpartaOrd(d,m) computes the order of SpartEncrypt(d,[0..m-1]) %o A119980 # in the group S_m %o A119980 SpartaOrd := function(d,m) %o A119980 local L, M, i; %o A119980 M := [0..m-1]; %o A119980 L := [0..m-1]; %o A119980 i := 0; %o A119980 repeat %o A119980 i := i + 1; %o A119980 L := SpartaEncrypt(d,L); %o A119980 until L=M; %o A119980 return i; %o A119980 end; %o A119980 d:=3; r:=1; %o A119980 a := List([0..60],n->SpartaOrd(d,d*n+r)); %o A119980 (PARI) %o A119980 P(n,w,j)={my(c=j%w); if(c==0, j/w, j\w + c*n + 1)} %o A119980 Follow(s,f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)} %o A119980 CyclePoly(n,w,x)={my(q=0); for(i=0, w*n, my(l=Follow(i, j->P(n,w,j))); if(l, q+=x^l)); q} %o A119980 a(n)={my(q=CyclePoly(n, 3, x), m=1); for(i=1, poldegree(q), if(polcoef(q, i), m=lcm(m, i))); m} \\ _Andrew Howroyd_, Jan 04 2024 %Y A119980 The case for 2 columns is A002326. %Y A119980 Cf. A003572. %K A119980 nonn %O A119980 0,2 %A A119980 _Roland Miyamoto_, Aug 03 2006