login
A351015
Smallest k such that the k-th composition in standard order has n distinct runs.
28
0, 1, 5, 27, 155, 1655, 18039, 281975
OFFSET
0,3
COMMENTS
The n-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 n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
It would be very interesting to have a formula or general construction for a(n). - Gus Wiseman, Feb 12 2022
EXAMPLE
The terms together with their binary expansions and corresponding compositions begin:
0: 0 ()
1: 1 (1)
5: 101 (2,1)
27: 11011 (1,2,1,1)
155: 10011011 (3,1,2,1,1)
1655: 11001110111 (1,3,1,1,2,1,1,1)
18039: 100011001110111 (4,1,3,1,1,2,1,1,1)
281975: 1000100110101110111 (4,3,1,2,2,1,1,2,1,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
s=Table[Length[Union[Split[stc[n]]]], {n, 0, 1000}];
Table[Position[s, k][[1, 1]]-1, {k, Union[s]}]
CROSSREFS
The version for Heinz numbers and prime multiplicities is A006939.
Counting not necessarily distinct runs gives A113835 (up to zero).
Using binary expansions instead of standard compositions gives A350952.
These are the positions of first appearances in A351014.
A005811 counts runs in binary expansion, distinct A297770.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A085207 represents concatenation of standard compositions, reverse A085208.
A333489 ranks anti-runs, complement A348612.
Counting words with all distinct runs:
- A351013 = compositions, for run-lengths A329739, ranked by A351290.
- A351016 = binary words, for run-lengths A351017.
- A351018 = binary expansions, for run-lengths A032020, ranked by A175413.
Selected statistics of standard compositions (A066099, reverse A228351):
- Length is A000120.
- Sum is A070939.
- Runs are counted by A124767.
- Number of distinct parts is A334028.
Sequence in context: A083880 A363185 A098409 * A052227 A357227 A101386
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Feb 10 2022
STATUS
approved