close
login
A390675
Number of integer compositions whose first sums are the (2n)-th composition in standard order.
28
1, 2, 0, 3, 1, 0, 0, 4, 1, 1, 0, 0, 0, 0, 0, 5, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 2, 0, 2, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 1, 2, 0, 3, 1, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0
OFFSET
1,2
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.
The first sums of a nonempty sequence (a, b, c, d, ...) are (a+b, b+c, c+d, ...).
FORMULA
a(2^k) = k+1.
EXAMPLE
The 68-th composition in standard order is (4,3), which is the first sums of both (2,2,1) and (3,1,2), so a(34) = 2.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
uncha[tar_, ini_]:=(cur={ini}; Do[AppendTo[cur, tar[[k]]-If[k==1, ini, cur[[k]]]], {k, Length[tar]}]; cur);
Table[Length[Select[Table[uncha[stc[n], i], {i, Max[stc[n]]}], Min@@#>=1&]], {n, 2, 100, 2}]
CROSSREFS
Positions of first appearances are A000079.
Positive terms (before bisection) are indicated by A390676, complement A390677.
Positions of 1 (before bisection) are A390745.
A011782 counts compositions.
A066099 lists all compositions in standard order.
A357213 counts compositions by sum of first sums.
A390432 lists first sums of standard compositions, rows ranked by A390568.
A390673 ranks compositions with distinct first sums, counted by A390567.
A390674 ranks compositions with equal first sums, counted by A342527.
Sequence in context: A240606 A335889 A324379 * A035165 A290256 A303110
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 22 2025
STATUS
approved