A359756 First position of n in the sequence of zero-based weighted sums of standard compositions (A124757), if we start with position 0.
0, 3, 6, 7, 13, 14, 15, 27, 29, 30, 31, 55, 59, 61, 62, 63, 111, 119, 123, 125, 126
Offset: 0
Examples
The terms together with their standard compositions begin: 0: () 3: (1,1) 6: (1,2) 7: (1,1,1) 13: (1,2,1) 14: (1,1,2) 15: (1,1,1,1) 27: (1,2,1,1) 29: (1,1,2,1) 30: (1,1,1,2) 31: (1,1,1,1,1)
Links
Crossrefs
Programs
-
Mathematica
nn=10; stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}]; seq=Table[wts[stc[n]],{n,0,2^(nn-1)}]; Table[Position[seq,k][[1,1]]-1,{k,0,nn}]
Comments