login
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.
1
1, 3, 6, 6, 11, 15, 52, 38, 51, 9, 360, 260, 35, 39, 364, 1932, 680, 532, 1122, 260, 2415, 3570, 168, 360, 71, 12285, 836, 12, 1680, 1155, 858, 936, 7956, 48300, 171120, 234, 4428, 235752, 712, 990, 119, 364182, 406, 11220, 412920, 25584, 476, 19998, 6486
OFFSET
0,2
LINKS
EXAMPLE
For n=2, the grid with 0..6 by rows is
0 1 2
3 4 5 first column is one longer
6
Reading them by columns gives (0,3,6,1,4,2,5) which as a permutation has order 6, so a(2) = 6.
PROG
(GAP) # GAP / KANT / KASH
# SpartaEncrypt(d, L) returns the list M obtained by writing L in d columns
# and then concatenating these columns
SpartaEncrypt := function(d, L)
local len, i, M;
len := Length(L);
M := [];
for i in [1..d] do
Append(M, L{[i, d+i..d*IntQuo(len-i, d)+i]});
od;
return M;
end;
# SpartaOrd(d, m) computes the order of SpartEncrypt(d, [0..m-1])
# in the group S_m
SpartaOrd := function(d, m)
local L, M, i;
M := [0..m-1];
L := [0..m-1];
i := 0;
repeat
i := i + 1;
L := SpartaEncrypt(d, L);
until L=M;
return i;
end;
d:=3; r:=1;
a := List([0..60], n->SpartaOrd(d, d*n+r));
(PARI)
P(n, w, j)={my(c=j%w); if(c==0, j/w, j\w + c*n + 1)}
Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
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}
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
CROSSREFS
The case for 2 columns is A002326.
Cf. A003572.
Sequence in context: A113497 A210692 A158662 * A066779 A132384 A201155
KEYWORD
nonn
AUTHOR
Roland Miyamoto, Aug 03 2006
STATUS
approved