OFFSET
1,6
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 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.
LINKS
EXAMPLE
The prime indices of 36 are {1,1,2,2}, with first differences plus one (1,2,1), which is the 13th composition in standard order, so a(36) = 13.
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[Differences[primeMS[n]]+1], {n, 100}]
CROSSREFS
See link for sequences related to standard compositions.
Taking Heinz number instead of standard composition number gives A325352.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 21 2022
STATUS
approved