OFFSET
1,2
COMMENTS
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
A multiset is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
EXAMPLE
The prime indices of 18564 are {1,1,2,4,6,7}, with maximal gapless submultisets {1,1,2}, {4}, {6,7}. These have lengths (3,1,2), with Heinz number 30, so a(18564) = 30.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Times@@Prime/@Length/@Split[primeMS[n], #1>=#2-1&], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 18 2022
STATUS
approved