A342865 Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 1234. 0 <= k <= A000332(n).
1, 1, 2, 6, 23, 1, 103, 12, 4, 0, 0, 1, 513, 102, 63, 10, 6, 12, 8, 0, 0, 5, 0, 0, 0, 0, 0, 1, 2761, 770, 665, 196, 146, 116, 142, 46, 10, 72, 32, 24, 0, 13, 0, 12, 18, 0, 0, 10, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0
Examples
Table begins: n\k| 0 1 2 3 4 5 6 ---+------------------------------------------------------------------- 0 | 1; 1 | 1; 2 | 2; 3 | 6; 4 | 23, 1; 5 | 103, 12, 4, 0, 0, 1; 6 | 513, 102, 63, 10, 6, 12, 8, ... 7 | 2761, 770, 665, 196, 146, 116, 142, ... 8 | 15767, 5545, 5982, 2477, 2148, 1204, 1782, ... 9 | 94359, 39220, 49748, 25886, 25190, 13188, 19936, ... 10 | 586590, 276144, 396642, 244233, 260505, 142550, 210663, ... 11 | 3763290, 1948212, 3089010, 2167834, 2493489, 1476655, 2136586, ...
Links
- Peter Kagey, Rows n = 0..13, flattened, based on Anders Kaseorg's Rust program in the Code Golf Stack Exchange link.
- Anders Kaseorg, Answer: Patterns in Permutations, Code Golf Stack Exchange.
Comments