Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A358171
The a(n)-th composition in standard order (A066099) is the first differences plus one of the prime indices of n (A112798).
1
0, 0, 0, 1, 0, 2, 0, 3, 1, 4, 0, 6, 0, 8, 2, 7, 0, 5, 0, 12, 4, 16, 0, 14, 1, 32, 3, 24, 0, 10, 0, 15, 8, 64, 2, 13, 0, 128, 16, 28, 0, 20, 0, 48, 6, 256, 0, 30, 1, 9, 32, 96, 0, 11, 4, 56, 64, 512, 0, 26, 0, 1024, 12, 31, 8, 40, 0, 192, 128, 18, 0, 29, 0
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.
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.
Prepend 1 to indices: A253566 (cf. A358169), inverse A253565 (cf. A242628).
Taking Heinz number instead of standard composition number gives A325352.
These compositions minus one are listed by A355536, sums A243055.
A001222 counts prime indices, distinct A001221.
A066099 lists standard compositions, lengths A000120, sums A070939.
A112798 lists prime indices, sum A056239.
A355534 = augmented diffs. of rev. prime indices, Heinz numbers A325351.
Sequence in context: A360692 A135156 A328967 * A277707 A357634 A344616
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 21 2022
STATUS
approved