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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280318 a(n) is the n-th permutation generated by Heap's algorithm, represented by row number of A055089. 2
0, 1, 3, 2, 4, 5, 11, 10, 8, 9, 7, 6, 12, 13, 15, 14, 16, 17, 23, 22, 20, 21, 19, 18, 93, 92, 94, 95, 90, 91, 78, 79, 81, 80, 82, 83, 89, 88, 86, 87, 85, 84, 74, 75, 73, 72, 77, 76, 52, 53, 48, 49, 51, 50, 71, 70, 68, 69, 67, 66, 55, 54, 59, 58 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

This is a permutation of the nonnegative integers. It divides naturally in sections of factorial length, so it can be seen as a triangle with row lengths A094258:

0,

1,

3, 2, 4, 5,

11, 10, 8, 9, 7, 6, 12, 13, 15, 14, 16, 17, 23, 22, 20, 21, 19, 18...

Compare A280319 for Steinhaus-Johnson-Trotter algorithm, which is a triangle of finite permutations rather than one infinite permutation.

LINKS

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

Tilman Piesk, Calculation in Python

Wikipedia, Heap's algorithm

EXAMPLE

Example for the first 24 entries of the sequence. On the right are the permutations of {1,2,3,4} in the order generated by the Heap's algorithm:

   n    rev colex        a(n)   Heap's

   0     1 2 3 4          0     1 2 3 4

   1     2 1 3 4          1     2 1 3 4

   2     1 3 2 4          3     3 1 2 4

   3     3 1 2 4          2     1 3 2 4

   4     2 3 1 4          4     2 3 1 4

   5     3 2 1 4          5     3 2 1 4

   6     1 2 4 3         11     4 2 1 3

   7     2 1 4 3         10     2 4 1 3

   8     1 4 2 3          8     1 4 2 3

   9     4 1 2 3          9     4 1 2 3

  10     2 4 1 3          7     2 1 4 3

  11     4 2 1 3          6     1 2 4 3

  12     1 3 4 2         12     1 3 4 2

  13     3 1 4 2         13     3 1 4 2

  14     1 4 3 2         15     4 1 3 2

  15     4 1 3 2         14     1 4 3 2

  16     3 4 1 2         16     3 4 1 2

  17     4 3 1 2         17     4 3 1 2

  18     2 3 4 1         23     4 3 2 1

  19     3 2 4 1         22     3 4 2 1

  20     2 4 3 1         20     2 4 3 1

  21     4 2 3 1         21     4 2 3 1

  22     3 4 2 1         19     3 2 4 1

  23     4 3 2 1         18     2 3 4 1

CROSSREFS

Cf. A055089, A094258, A280319.

Sequence in context: A059320 A255167 A264993 * A246982 A258215 A319073

Adjacent sequences:  A280315 A280316 A280317 * A280319 A280320 A280321

KEYWORD

nonn,tabf

AUTHOR

Tilman Piesk, Dec 31 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 07:06 EDT 2019. Contains 326115 sequences. (Running on oeis4.)