login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 18
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
PermRank3Aux is a slight modification of rank2 algorithm presented in Myrvold-Ruskey article.
LINKS
W. Myrvold and F. Ruskey, Ranking and Unranking Permutations in Linear Time, Inform. Process. Lett. 79 (2001), no. 6, 281-284.
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))))
CROSSREFS
Cf. A261220 (fixed points).
Cf. A056019 (compare the scatter plots).
Sequence in context: A265362 A264989 A328625 * A265361 A328626 A265357
KEYWORD
nonn,base,look
AUTHOR
Antti Karttunen, Mar 02 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 10:41 EDT 2024. Contains 375542 sequences. (Running on oeis4.)