login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 6

%I #19 Mar 28 2021 04:05:57

%S 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,

%T 2761,770,665,196,146,116,142,46,10,72,32,24,0,13,0,12,18,0,0,10,0,0,

%U 0,0,0,6,0,0,0,0,0,0,0,0,0,1

%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 1234. 0 <= k <= A000332(n).

%C Equivalently the table for the pattern 4321.

%C First column is A005802.

%H Peter Kagey, <a href="/A342865/b342865.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, 12, 4, 0, 0, 1;

%e 6 | 513, 102, 63, 10, 6, 12, 8, ...

%e 7 | 2761, 770, 665, 196, 146, 116, 142, ...

%e 8 | 15767, 5545, 5982, 2477, 2148, 1204, 1782, ...

%e 9 | 94359, 39220, 49748, 25886, 25190, 13188, 19936, ...

%e 10 | 586590, 276144, 396642, 244233, 260505, 142550, 210663, ...

%e 11 | 3763290, 1948212, 3089010, 2167834, 2493489, 1476655, 2136586, ...

%Y Cf. A000332, A005802.

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

%K nonn,tabf

%O 0,3

%A _Peter Kagey_, Mar 26 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 8 14:00 EDT 2024. Contains 375021 sequences. (Running on oeis4.)