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 321-pattern in a heapable permutation p = (p(1), p(2), ..., p(n)) is a triad of indices x < y < z where p(z) < p(y) < p(x).
LINKS
Sean A. Irvine, Table of n, a(n) for n = 0..556
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.
EXAMPLE
Triangle begins:
1
1
1
2
5
14, 3
42, 18, 11
132, 82, 84, 27, 22, 11, 1
429, 339, 456, 256, 243, 143, 124, 61, 43, 28, 4
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Manolopoulos Panagiotis, Dec 24 2025
EXTENSIONS
Offset corrected and more terms from Sean A. Irvine, Jan 26 2026
STATUS
approved
