OFFSET
1,3
COMMENTS
Note: the number of fixed terms in each successive range [0, n!-1] is given by A000045(n+1) (Fibonacci numbers) and the corresponding positions by A060112. (Foata transform fixes a permutation only if it is composed of disjoint adjacent transpositions.)
This version of the Foata transform is one of several. This map takes a permutation s in S_n with k cycles to a permutation t in S_n with k upper records, i.e., k indices i for which t(i) > max{t(j): j < i}. - Theodore Zhu, Aug 15 2014
MAPLE
FoataPermutationCycleCounts_Lengths_and_LCM := proc(upto_n) local u, n, a, b, i, f; a := []; b := []; f := 1; for i from 0 to upto_n! -1 do b := [op(b), 1+PermRank3R(Foata(PermUnrank3R(i)))]; if((f - 1) = i) then a := [op(a), [CountCycles(b), CycleLengths1(b), CyclesLCM(b)]]; print (a); f := f*(nops(a)+1); fi; od; RETURN(a); end;
lcmlist := proc(a) local z, e; z := 1; for e in a do z := ilcm(z, e); od; RETURN(z); end;
CyclesLCM := b -> lcmlist(map(nops, convert(b, 'disjcyc')));
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Antti Karttunen, Oct 19 2001
EXTENSIONS
More terms from Theodore Zhu, Aug 15 2014
STATUS
approved