OFFSET
1,2
COMMENTS
A permutation is heapable if it can be inserted into a binary min-heap by the usual insertion process without violating the heap property.
A fixed point of a permutation p is an index i such that p(i) = i.
LINKS
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, 126-137.
Manolopoulos Panagiotis, Python program
Wikipedia, Binary heap
EXAMPLE
For n=4, the heapable permutations are (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,3,4,2), (1,4,2,3).
Their fixed points are:
(1,2,3,4): {1,2,3,4}, 4 fixed points;
(1,2,4,3): {1,2}, 2 fixed points;
(1,3,2,4): {1,4}, 2 fixed points;
(1,3,4,2): {1}, 1 fixed point;
(1,4,2,3): {1}, 1 fixed point.
a(4) = 10 since the total number of fixed points is 4 + 2 + 2 + 1 + 1 = 10.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Manolopoulos Panagiotis, Sep 15 2025
EXTENSIONS
a(12)-a(15) from Sean A. Irvine, Sep 26 2025
a(16) from Sean A. Irvine, Oct 14 2025
STATUS
approved
