cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A280319 Irregular triangle read by rows: T(m, n) is the n-th permutation of m things generated by the Steinhaus-Johnson-Trotter algorithm, represented by row number of A055089.

Original entry on oeis.org

0, 0, 1, 0, 2, 3, 5, 4, 1, 0, 6, 8, 9, 15, 14, 12, 2, 3, 13, 16, 17, 23, 22, 19, 5, 4, 18, 20, 21, 11, 10, 7, 1, 0, 24, 30, 32, 33, 57, 56, 54, 48, 6, 8, 50, 60, 62, 63, 65, 64, 61, 51, 9, 15, 75, 85, 88, 89, 87, 86, 84, 74, 14, 12, 72, 78, 80, 81
Offset: 0

Views

Author

Tilman Piesk, Dec 31 2016

Keywords

Comments

Row m is a permutation of the integers 0..m!-1, so this is a triangle in which row m>=1 has length A000142(m).
Compare A280318 for Heap's algorithm, which is one infinite permutation rather than a triangle of finite permutations.

Examples

			Triangle begins:
  m/n   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
  1     0
  2     0  1
  3     0  2  3  5  4  1
  4     0  6  8  9 15 14 12  2  3 13 16 17 23 22 19  5  4 18 20 21 11 10  7  1
Example for row m=4. On the right are the permutations of {1,2,3,4} in the order generated by the Steinhaus-Johnson-Trotter algorithm (A207324):
   n    rev colex      T(4,n)     SJT
   0     1 2 3 4          0     1 2 3 4
   1     2 1 3 4          6     1 2 4 3
   2     1 3 2 4          8     1 4 2 3
   3     3 1 2 4          9     4 1 2 3
   4     2 3 1 4         15     4 1 3 2
   5     3 2 1 4         14     1 4 3 2
   6     1 2 4 3         12     1 3 4 2
   7     2 1 4 3          2     1 3 2 4
   8     1 4 2 3          3     3 1 2 4
   9     4 1 2 3         13     3 1 4 2
  10     2 4 1 3         16     3 4 1 2
  11     4 2 1 3         17     4 3 1 2
  12     1 3 4 2         23     4 3 2 1
  13     3 1 4 2         22     3 4 2 1
  14     1 4 3 2         19     3 2 4 1
  15     4 1 3 2          5     3 2 1 4
  16     3 4 1 2          4     2 3 1 4
  17     4 3 1 2         18     2 3 4 1
  18     2 3 4 1         20     2 4 3 1
  19     3 2 4 1         21     4 2 3 1
  20     2 4 3 1         11     4 2 1 3
  21     4 2 3 1         10     2 4 1 3
  22     3 4 2 1          7     2 1 4 3
  23     4 3 2 1          1     2 1 3 4
		

Crossrefs

Showing 1-1 of 1 results.