A060125 Self-inverse infinite permutation which shows the position of the inverse of each finite permutation in A060117 (or A060118) in the same sequence; or equally, the cross-indexing between A060117 and A060118.
0, 1, 2, 5, 4, 3, 6, 7, 14, 23, 22, 15, 12, 19, 8, 11, 16, 21, 18, 13, 20, 17, 10, 9, 24, 25, 26, 29, 28, 27, 54, 55, 86, 119, 118, 87, 84, 115, 56, 59, 88, 117, 114, 85, 116, 89, 58, 57, 48, 49, 74, 101, 100, 75, 30, 31, 38, 47, 46, 39, 60, 67, 80, 107, 112, 93, 66, 61, 92
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..5040
- W. Myrvold and F. Ruskey, Ranking and Unranking Permutations in Linear Time, Inform. Process. Lett. 79 (2001), no. 6, 281-284.
- Index entries for sequences related to factorial base representation
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
Maple
with(group); permul := (a,b) -> mulperms(b,a); swap := (p,i,j) -> convert(permul(convert(p,'disjcyc'),[[i,j]]),'permlist',nops(p)); PermRank3Aux := proc(n, p, q) if(1 = n) then RETURN(0); else RETURN((n-p[n])*((n-1)!) + PermRank3Aux(n-1,swap(p,n,q[n]),swap(q,n,p[n]))); fi; end; PermRank3R := p -> PermRank3Aux(nops(p),p,convert(invperm(convert(p,'disjcyc')),'permlist',nops(p))); PermRank3L := p -> PermRank3Aux(nops(p),convert(invperm(convert(p,'disjcyc')),'permlist',nops(p)),p); # a(n) = PermRank3L(PermUnrank3R(n)) or PermRank3R(PermUnrank3L(n)) or PermRank3L(convert(invperm(convert(PermUnrank3L(j), 'disjcyc')), 'permlist', nops(PermUnrank3L(j))))
Comments