login
A390546
Triangle read by rows: T(n,k) = number of heapable permutations of length n that contain the max element on position k (positions starting from 0).
3
1, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 2, 5, 5, 5, 0, 5, 15, 17, 17, 17, 0, 17, 58, 71, 71, 71, 71, 0, 71, 268, 351, 359, 359, 359, 359, 0, 359, 1471, 2035, 2126, 2126, 2126, 2126, 2126, 0, 2126, 9336, 13538, 14446, 14495, 14495, 14495, 14495, 14495
OFFSET
1,9
COMMENTS
A permutation is heapable if its elements can be inserted into a binary min-heap in breadth-first order without violating the heap property.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..120 (rows 1..15 flattened)
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
0, 1
0, 1, 1
0, 1, 2, 2
0, 2, 5, 5, 5
0, 5, 15, 17, 17, 17
0, 17, 58, 71, 71, 71, 71
CROSSREFS
Cf. A336282 (number of heapable permutations), A390273 (total sums of heights), A390377 (the triangle for positions of 2), A390450 (sums of positions of 2).
Sequence in context: A008281 A094671 A354826 * A202015 A193350 A021458
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
More terms from Sean A. Irvine, Nov 23 2025
STATUS
approved