A124757 Zero-based weighted sum of compositions in standard order.
0, 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 3, 4, 5, 6, 0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 5, 6, 7, 8, 8, 9, 10, 11, 9, 10, 11, 12, 12, 13, 14, 15, 0, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 7, 8, 9, 10, 5, 6, 7, 8, 8, 9, 10, 11, 9, 10, 11, 12, 12, 13, 14
Offset: 0
Examples
Composition number 11 is 2,1,1; 0*2+1*1+2*1 = 3, so a(11) = 3. The table starts: 0 0 0 1 0 1 2 3
Links
- Alois P. Heinz, Rows n = 0..14, flattened
Crossrefs
Programs
-
Mathematica
Table[Total[Most[Join@@Position[Reverse[IntegerDigits[n,2]],1]]],{n,30}]
Comments