OFFSET
0,2
COMMENTS
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.
FORMULA
a(n) = A333224(n) + 1.
EXAMPLE
The ninth composition in standard order is (3,1), which has consecutive subsequences (), (1), (3), (3,1), with sums 0, 1, 3, 4, so a(9) = 4.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Length[Union[ReplaceList[stc[n], {___, s___, ___}:>Plus[s]]]], {n, 0, 100}]
CROSSREFS
Dominated by A124771.
Compositions where every subinterval has a different sum are counted by A169942 and A325677 and ranked by A333222, while the case of partitions is counted by A325768 and ranked by A325779.
The version for Heinz numbers of partitions is A325770.
Not allowing empty subsequences gives A333224.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 20 2020
STATUS
approved