OFFSET
1,4
COMMENTS
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
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), which is the 38th composition in standard order, so a(18564) = 38.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
Table[stcinv[Length/@Split[primeMS[n], #1>=#2-1&]], {n, 100}]
CROSSREFS
These are the standard composition numbers of rows of A356226.
Using Heinz numbers instead of standard compositions gives A356231.
A003963 multiplies together the prime indices.
A066099 lists compositions in standard order.
A333627 represents the run-lengths of standard compositions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2022
STATUS
approved