OFFSET
0,3
COMMENTS
The sequence is the same for the patterns 1342, 2431, and 3124.
The sequence appears to be the same for the patterns 1423, 2314, 3241, and 4132.
First column is given by A022558. Row sums given by n!.
LINKS
Peter Kagey, Rows n = 0..13, flattened, based on Anders Kaseorg's Rust program at the Code Golf Stack Exchange link.
Anders Kaseorg, Answer: Patterns in Permutations, Code Golf Stack Exchange.
Rob Pratt, Greatest number of occurrences of the pattern 4213 in a permutation, Mathematics Stack Exchange.
Eric Weisstein's World of Mathematics, Permutation Pattern
EXAMPLE
Triangle begins:
n\k | 0 1 2 3 4 5 6 7 8 9 10 11 12 13
----+-------------------------------------------------------------
0 | 1;
1 | 1;
2 | 2;
3 | 6;
4 | 23, 1;
5 | 103, 10, 6, 1;
6 | 512, 77, 69, 30, 21, 5, 6;
7 | 2740, 548, 598, 330, 335, 123, 174, 58, 58, 37, 26, 3, 9, 1;
MATHEMATICA
Join@@Array[Table[Length@Select[Permutations@Range@#, Length@Select[Subsets[#, {4}], Ordering@Ordering@#=={4, 2, 1, 3}&]==k&], {k, 0, Binomial[n+1, 4]}]//.{a__, 0}:>{a}&, 8, 0] (* Giorgos Kalogeropoulos, Mar 25 2021 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Kagey, Mar 24 2021
STATUS
approved