OFFSET
0,4
COMMENTS
A permutation of [1..n] is heapable if it can be inserted, one element at a time, into a binary min-heap without violating the heap property.
A 213-pattern in a heapable permutation p=(p(1),p(2),...,p(n)) is a triad of indices x<y<z where p(x)<p(y)<p(z).
LINKS
Sean A. Irvine, Table of n, a(n) for n = 0..536
Benjamin Chen, Michael Cho, Mario Tutuncu-Macias, and Tony Tzolov, Efficient methods of calculating the number of heapable permutations, Discrete Applied Mathematics Volume 331, 31 May 2023, Pages 126-137.
Manolopoulos Panagiotis, Python Program
FORMULA
Sum_{k >= 0} k*T(n,k) = A391697(n).
EXAMPLE
Triangle begins:
1
1
1
2
4, 1
10, 3, 4
25, 12, 14, 10, 10
69, 38, 59, 38, 63, 26, 40, 20, 6
192, 133, 202, 179, 259, 175, 244, 183, 180, 122, 127, 68, 49, 9, 4
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Manolopoulos Panagiotis, Dec 11 2025
EXTENSIONS
More terms from Sean A. Irvine, Dec 17 2025
STATUS
approved
