OFFSET
0,8
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 132-pattern in a heapable permutation p=(p1,p2..pn) is a triad of indices i<j<k where pi<pk<pj.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 0..892
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;
1, 1;
1, 1, 3;
1, 1, 3, 3, 6, 2, 1;
1, 1, 3, 3, 9, 3, 18, 12, 10, 7, 4;
1, 1, 3, 3, 9, 6, 19, 17, 29, 30, 54, 40, 47, 28, 41, 14, 8, 7, 1, 1;
...
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Manolopoulos Panagiotis, Dec 01 2025
EXTENSIONS
More terms from Sean A. Irvine, Dec 15 2025
STATUS
approved
