|
|
A124757
|
|
Zero-based weighted sum of compositions in standard order.
|
|
17
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,7
|
|
COMMENTS
|
The standard order of compositions is given by A066099.
Sum of all positions of 1's except the last in the reversed binary expansion of n. For example, the reversed binary expansion of 14 is (0,1,1,1), so a(14) = 2 + 3 = 5. Keeping the last position gives A029931. - Gus Wiseman, Jan 17 2023
|
|
LINKS
|
|
|
FORMULA
|
For a composition b(1),...,b(k), a(n) = Sum_{i=1..k} (i-1)*b(i).
|
|
EXAMPLE
|
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
|
|
MATHEMATICA
|
Table[Total[Most[Join@@Position[Reverse[IntegerDigits[n, 2]], 1]]], {n, 30}]
|
|
CROSSREFS
|
Row sums of A048793 if we delete the last part of every row.
For prime indices instead of standard comps we have A359674, rev A359677.
Positions of first appearances are A359756.
A003714 lists numbers with no successive binary indices.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|