A356956 Numbers k such that the k-th composition in standard order is a gapless interval (in increasing order).
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
Offset: 1
Keywords
Examples
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)
Links
Crossrefs
Programs
-
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[#]]&]
Comments