login
Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 1432. 0 <= k <= A100354(n).
6

%I #26 Mar 28 2021 07:05:34

%S 1,1,2,6,23,1,103,11,5,0,1,513,87,68,17,18,10,0,4,2,0,1,2761,625,626,

%T 268,274,138,112,58,51,44,31,9,15,8,12,0,5,0,0,0,3,15767,4378,5038,

%U 2781,3060,1697,1817,1036,964,773,656,450,379,320,285,148,237,97,98,55,68,61,23,30,30,13,30,0,0,0,16,0,10,0,0,1,0,0,0,0,2

%N Irregular table read by rows: T(n,k) is the number of permutations in S_n that have exactly k occurrences of the pattern 1432. 0 <= k <= A100354(n).

%C Equivalently the table for the patterns 2341, 3214, and 4123.

%C First column is A005802.

%H Peter Kagey, <a href="/A342864/b342864.txt">Rows n = 0..13, flattened</a>, based on Anders Kaseorg's Rust program in the Code Golf Stack Exchange link.

%H Anders Kaseorg, <a href="https://codegolf.stackexchange.com/a/222494/53884">Answer: Patterns in Permutations</a>, Code Golf Stack Exchange.

%e Table begins:

%e n\k| 0 1 2 3 4 5 6

%e ---+-------------------------------------------------------------------

%e 0 | 1;

%e 1 | 1;

%e 2 | 2;

%e 3 | 6;

%e 4 | 23, 1;

%e 5 | 103, 11, 5, 0, 1;

%e 6 | 513, 87, 68, 17, 18, 10, 0, ...

%e 7 | 2761, 625, 626, 268, 274, 138, 112, ...

%e 8 | 15767, 4378, 5038, 2781, 3060, 1697, 1817, ...

%e 9 | 94359, 30671, 38541, 24731, 28881, 17943, 21193, ...

%e 10 | 586590, 216883, 289785, 205853, 251051, 170941, 211942, ...

%e 11 | 3763290, 1552588, 2172387, 1663964, 2096207, 1535129, 1954751, ...

%Y Cf. A005802, A100354.

%Y Analogous for other patterns: A008302 (12), A138159 (321), A263771 (312), A342840 (1342), A342860 (2413), A342861 (1324), A342862 (2143), A342863 (1243), A342865 (1234).

%K nonn,tabf

%O 0,3

%A _Peter Kagey_, Mar 26 2021