cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A342865 #19 Mar 28 2021 04:05:57
%S A342865 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 A342865 2761,770,665,196,146,116,142,46,10,72,32,24,0,13,0,12,18,0,0,10,0,0,
%U A342865 0,0,0,6,0,0,0,0,0,0,0,0,0,1
%N 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).
%C A342865 Equivalently the table for the pattern 4321.
%C A342865 First column is A005802.
%H A342865 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 A342865 Anders Kaseorg, <a href="https://codegolf.stackexchange.com/a/222494/53884">Answer: Patterns in Permutations</a>, Code Golf Stack Exchange.
%e A342865 Table begins:
%e A342865   n\k|       0        1        2        3        4        5        6
%e A342865   ---+-------------------------------------------------------------------
%e A342865    0 |       1;
%e A342865    1 |       1;
%e A342865    2 |       2;
%e A342865    3 |       6;
%e A342865    4 |      23,       1;
%e A342865    5 |     103,      12,       4,       0,       0,       1;
%e A342865    6 |     513,     102,      63,      10,       6,      12,       8, ...
%e A342865    7 |    2761,     770,     665,     196,     146,     116,     142, ...
%e A342865    8 |   15767,    5545,    5982,    2477,    2148,    1204,    1782, ...
%e A342865    9 |   94359,   39220,   49748,   25886,   25190,   13188,   19936, ...
%e A342865   10 |  586590,  276144,  396642,  244233,  260505,  142550,  210663, ...
%e A342865   11 | 3763290, 1948212, 3089010, 2167834, 2493489, 1476655, 2136586, ...
%Y A342865 Cf. A000332, A005802.
%Y A342865 Analogous for other patterns: A008302 (12), A138159 (321), A263771 (312), A342840 (1342), A342860 (2413), A342861 (1324), A342862 (2143), A342863 (1243), A342864 (1432).
%K A342865 nonn,tabf
%O A342865 0,3
%A A342865 _Peter Kagey_, Mar 26 2021