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.

A333630 Least STC-number of a composition whose sequence of run-lengths has STC-number n.

Original entry on oeis.org

0, 1, 3, 5, 7, 14, 11, 13, 15, 30, 43, 29, 23, 46, 27, 45, 31, 62, 122, 61, 87, 117, 59, 118, 47, 94, 107, 93, 55, 110, 91, 109, 63, 126, 250, 125, 343, 245, 123, 246, 175, 350, 235, 349, 119, 238, 347, 237, 95, 190, 378, 189, 215, 373, 187, 374, 111, 222, 363
Offset: 0

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

All terms belong to A003754.
A composition of n is a finite sequence of positive integers summing to n. The composition with STC-number k (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. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence together with the corresponding compositions begins:
   0: ()
   1: (1)
   3: (1,1)
   5: (2,1)
   7: (1,1,1)
  14: (1,1,2)
  11: (2,1,1)
  13: (1,2,1)
  15: (1,1,1,1)
  30: (1,1,1,2)
  43: (2,2,1,1)
  29: (1,1,2,1)
  23: (2,1,1,1)
  46: (2,1,1,2)
  27: (1,2,1,1)
  45: (2,1,2,1)
  31: (1,1,1,1,1)
  62: (1,1,1,1,2)
		

Crossrefs

Position of first appearance of n in A333627.
All of the following pertain to compositions in standard order (A066099):
- The length is A000120.
- Compositions without terms > 2 are A003754.
- Compositions without ones are ranked by A022340.
- The partial sums from the right are A048793.
- The sum is A070939.
- Adjacent equal pairs are counted by A124762.
- Equal runs are counted by A124767.
- Strict compositions are ranked by A233564.
- The partial sums from the left are A272020.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Heinz number is A333219.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Runs-resistance is A333628.
- First appearances of run-resistances are A333629.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    seq=Table[Total[2^(Accumulate[Reverse[Length/@Split[stc[n]]]])]/2,{n,0,1000}];
    Table[Position[seq,i][[1,1]],{i,First[Split[Union[seq],#1+1==#2&]]}]-1