cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A333379 Numbers k such that the k-th composition in standard order is weakly increasing and covers an initial interval of positive integers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Mar 21 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.

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[#]&]

Formula

Intersection of A333217 and A225620.