A357877 The a(n)-th composition in standard order is the sequence of run-sums of the prime indices of n.
0, 1, 2, 2, 4, 6, 8, 4, 8, 12, 16, 10, 32, 24, 20, 8, 64, 24, 128, 20, 40, 48, 256, 18, 32, 96, 32, 40, 512, 52, 1024, 16, 80, 192, 72, 40, 2048, 384, 160, 36, 4096, 104, 8192, 80, 68, 768, 16384, 34, 128, 96, 320, 160, 32768, 96, 144, 72, 640, 1536, 65536, 84
Offset: 1
Keywords
Examples
The prime indices of 24 are (1,1,1,2), with run-sums (3,2), and this is the 18th composition in standard order, so a(24) = 18.
Links
- Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
Crossrefs
The version for prime indices instead of standard compositions is A353832.
The version for standard compositions instead of prime indices is A353847.
A ranking of the rows of A354584.
A011782 counts compositions.
A066099 lists standard compositions.
A351014 counts distinct runs in standard compositions.
Programs
-
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[Total/@Split[primeMS[n]]],{n,100}]
Comments