

A354581


Numbers k such that the kth composition in standard order is rucksack, meaning every distinct partial run has a different sum.


4



0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 56, 57, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 80, 81, 82, 84, 85, 86, 88
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

We define a partial run of a sequence to be any contiguous constant subsequence.
The kth composition in standard order (graded reverselexicographic, 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 term rucksack is short for runknapsack.


LINKS



EXAMPLE

The terms together with their corresponding compositions begin:
0: ()
1: (1)
2: (2)
3: (1,1)
4: (3)
5: (2,1)
6: (1,2)
7: (1,1,1)
8: (4)
9: (3,1)
10: (2,2)
12: (1,3)
13: (1,2,1)
15: (1,1,1,1)
Missing are:
11: (2,1,1)
14: (1,1,2)
23: (2,1,1,1)
27: (1,2,1,1)
29: (1,1,2,1)
30: (1,1,1,2)
39: (3,1,1,1)
43: (2,2,1,1)
46: (2,1,1,2)


MATHEMATICA

stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], UnsameQ@@Total/@Union@@Subsets/@Split[stc[#]]&]


CROSSREFS

The version for binary indices is A000225.
Counting distinct sums of full runs gives A353849, partitions A353835.
These compositions are counted by A354580.
Counting distinct sums of partial runs gives A354907, partitions A353861.
A066099 lists all compositions in standard order.
A124767 counts runs in standard compositions.
A124771 counts distinct contiguous subsequences, noncontiguous A334299.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353838 ranks partitions with all distinct runsums, counted by A353837.
A353851 counts compositions with all equal runsums, ranked by A353848.
A353852 ranks compositions with all distinct runsums, counted by A353850.
A353932 lists runsums of standard compositions, rows ranked by A353847.
Cf. A000120, A005811, A029837, A063787, A175413, A181819, A330036, A333381, A333489, A353832, A353860.


KEYWORD

nonn


AUTHOR



STATUS

approved



