login
A334299
Number of distinct subsequences (not necessarily contiguous) of compositions in standard order (A066099).
28
1, 2, 2, 3, 2, 4, 4, 4, 2, 4, 3, 6, 4, 7, 6, 5, 2, 4, 4, 6, 4, 6, 7, 8, 4, 7, 6, 10, 6, 10, 8, 6, 2, 4, 4, 6, 3, 8, 8, 8, 4, 8, 4, 9, 8, 12, 11, 10, 4, 7, 8, 10, 8, 11, 12, 13, 6, 10, 9, 14, 8, 13, 10, 7, 2, 4, 4, 6, 4, 8, 8, 8, 4, 6, 6, 12, 7, 14, 12, 10, 4
OFFSET
0,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.
FORMULA
a(n) = A334300(n) + 1.
EXAMPLE
Triangle begins:
1
2
2 3
2 4 4 4
2 4 3 6 4 7 6 5
2 4 4 6 4 6 7 8 4 7 6 10 6 10 8 6
If the k-th composition in standard order is c, then we say that the STC-number of c is k. The n-th column below lists the STC-numbers of the subsequences of the composition with STC-number n:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 1 0 2 2 3 0 4 2 5 4 6 6 7
0 1 1 1 1 0 3 1 5 3 3
0 0 0 0 2 0 3 2 1
1 2 1 0
0 1 0
0
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Length[Union[Subsets[stc[n]]]], {n, 0, 100}]
CROSSREFS
Row lengths are A011782.
Looking only at contiguous subsequences gives A124771.
Compositions where every subinterval has a different sum are A333222.
Knapsack compositions are A333223.
Contiguous positive subsequence-sums are counted by A333224.
Contiguous subsequence-sums are counted by A333257.
Disallowing empty subsequences gives A334300.
Subsequence-sums are counted by A334968.
Sequence in context: A333257 A334968 A124771 * A066589 A007897 A180783
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 01 2020
STATUS
approved