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.
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
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
Links
- Tilman Piesk, Triangle rows m=1..7, flattened
- Tilman Piesk, Calculation with Python
- Wikipedia, Steinhaus-Johnson-Trotter algorithm
Comments