login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056019 Self-inverse infinite permutation which shows the position of each finite permutation's inverse permutation in A055089. 10
0, 1, 2, 4, 3, 5, 6, 7, 12, 18, 13, 19, 8, 10, 14, 20, 16, 22, 9, 11, 15, 21, 17, 23, 24, 25, 26, 28, 27, 29, 48, 49, 72, 96, 73, 97, 50, 52, 74, 98, 76, 100, 51, 53, 75, 99, 77, 101, 30, 31, 36, 42, 37, 43, 54, 55, 78, 102, 79, 103, 60, 66, 84, 108, 90, 114, 61, 67, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

PermRevLexRank and PermRevLexUnrank have been modified from the algorithms PermLexRank and PermLexUnrank presented in the book "Combinatorial Algorithms, Generation, Enumeration and Search", by Donald L. Kreher and Douglas R. Stinson.

LINKS

Tilman Piesk, Table of n, a(n) for n = 0..5039

Index entries for sequences that are permutations of the natural numbers

FORMULA

[seq(PermRevLexRank(convert(invperm(convert(PermRevLexUnrank(j), 'disjcyc')), 'permlist', nops(PermRevLexUnrank(j)))), j=0..200)];

EXAMPLE

E.g. the permutation [2,3,1] is the 4th permutation (counting from 0th, the identity permutation) of A055089, its inverse permutation is [3,1,2] which is 3rd, thus a(4)=3 and a(3)=4.

MAPLE

PermRevLexRank := proc(pp) local p, n, i, j, r; p := pp; n := nops(p); r := 0; for j from n by -1 to 1 do r := r + (((j-p[j])*((j-1)!))); for i from 1 to (j-1) do if(p[i] > p[j]) then p[i] := p[i]-1; fi; od; od; RETURN(r); end;

CROSSREFS

Sequence in context: A228083 A222234 A131042 * A125963 A111269 A107896

Adjacent sequences:  A056016 A056017 A056018 * A056020 A056021 A056022

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jun 08 2000

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified November 28 05:47 EST 2014. Contains 250286 sequences.