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.

A351015 Smallest k such that the k-th composition in standard order has n distinct runs.

Original entry on oeis.org

0, 1, 5, 27, 155, 1655, 18039, 281975
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2022

Keywords

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

Examples

			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)
		

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.

Programs

  • 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]}]