A333379 Numbers k such that the k-th composition in standard order is weakly increasing and covers an initial interval of positive integers.
0, 1, 3, 6, 7, 14, 15, 26, 30, 31, 52, 58, 62, 63, 106, 116, 122, 126, 127, 212, 234, 244, 250, 254, 255, 420, 426, 468, 490, 500, 506, 510, 511, 840, 852, 932, 938, 980, 1002, 1012, 1018, 1022, 1023, 1700, 1706, 1864, 1876, 1956, 1962, 2004, 2026, 2036, 2042
Offset: 1
Keywords
Examples
The sequence of terms together with the corresponding compositions begins: 0: () 127: (1,1,1,1,1,1,1) 1: (1) 212: (1,2,2,3) 3: (1,1) 234: (1,1,2,2,2) 6: (1,2) 244: (1,1,1,2,3) 7: (1,1,1) 250: (1,1,1,1,2,2) 14: (1,1,2) 254: (1,1,1,1,1,1,2) 15: (1,1,1,1) 255: (1,1,1,1,1,1,1,1) 26: (1,2,2) 420: (1,2,3,3) 30: (1,1,1,2) 426: (1,2,2,2,2) 31: (1,1,1,1,1) 468: (1,1,2,2,3) 52: (1,2,3) 490: (1,1,1,2,2,2) 58: (1,1,2,2) 500: (1,1,1,1,2,3) 62: (1,1,1,1,2) 506: (1,1,1,1,1,2,2) 63: (1,1,1,1,1,1) 510: (1,1,1,1,1,1,1,2) 106: (1,2,2,2) 511: (1,1,1,1,1,1,1,1,1) 116: (1,1,2,3) 840: (1,2,3,4) 122: (1,1,1,2,2) 852: (1,2,2,2,3) 126: (1,1,1,1,1,2) 932: (1,1,2,3,3)
Crossrefs
Sequences covering an initial interval are counted by A000670.
Compositions in standard order are A066099.
Weakly increasing runs are counted by A124766.
Removing the covering condition gives A225620.
Removing the ordering condition gives A333217.
The strictly increasing case is A164894.
The strictly decreasing version is A246534.
The unequal version is A333218.
The weakly decreasing version is A333380.
Programs
-
Mathematica
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]]; stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Select[Range[0,1000],normQ[stc[#]]&&LessEqual@@stc[#]&]
Comments