login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356956 Numbers k such that the k-th composition in standard order is a gapless interval (in increasing order). 1
0, 1, 2, 4, 6, 8, 16, 20, 32, 52, 64, 72, 128, 256, 272, 328, 512, 840, 1024, 1056, 2048, 2320, 4096, 4160, 8192, 10512, 16384, 16512, 17440, 26896, 32768, 65536, 65792, 131072, 135232, 148512, 262144, 262656, 524288, 672800, 1048576, 1049600, 1065088, 1721376 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
An interval such as {3,4,5} is a set of positive integers with all differences of adjacent elements equal to 1.
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.
LINKS
EXAMPLE
The terms and corresponding intervals begin:
0: ()
1: (1)
2: (2)
4: (3)
6: (1,2)
8: (4)
16: (5)
20: (2,3)
32: (6)
52: (1,2,3)
64: (7)
72: (3,4)
128: (8)
256: (9)
272: (4,5)
328: (2,3,4)
512: (10)
840: (1,2,3,4)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
chQ[y_]:=Length[y]<=1||Union[Differences[y]]=={1};
Select[Range[0, 1000], chQ[stc[#]]&]
CROSSREFS
See link for sequences related to standard compositions.
These compositions are counted by A001227.
An unordered version is A073485, non-strict A073491 (complement A073492).
The initial version is A164894, non-strict A356843 (unordered A356845).
The non-strict version is A356841, initial A333217, counted by A107428.
A066311 lists gapless numbers.
A356230 ranks gapless factorization lengths, firsts A356603.
A356233 counts factorizations into gapless numbers.
A356844 ranks compositions with at least one 1.
Sequence in context: A329798 A364814 A353867 * A064408 A316225 A100685
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 9 00:53 EDT 2024. Contains 374171 sequences. (Running on oeis4.)