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.

A353696 Numbers k such that the k-th composition in standard order (A066099) is empty, a singleton, or has run-lengths that are a consecutive subsequence that is already counted.

Original entry on oeis.org

0, 1, 2, 4, 8, 10, 16, 32, 43, 58, 64, 128, 256, 292, 349, 442, 512, 586, 676, 697, 826, 1024, 1210, 1338, 1393, 1394, 1396, 1594, 2048, 2186, 2234, 2618, 2696, 2785, 2786, 2792, 3130, 4096, 4282, 4410, 4666, 5178, 5569, 5570, 5572, 5576, 5584, 6202, 8192
Offset: 1

Views

Author

Gus Wiseman, May 22 2022

Keywords

Comments

First differs from the non-consecutive version A353431 in lacking 22318, corresponding to the binary word 101011100101110 and standard composition (2,2,1,1,3,2,1,1,2), whose run-lengths (2,2,1,1,2,1) are a subsequence but not a consecutive subsequence.
The k-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 k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding compositions begin:
    0: ()
    1: (1)
    2: (2)
    4: (3)
    8: (4)
   10: (2,2)
   16: (5)
   32: (6)
   43: (2,2,1,1)
   58: (1,1,2,2)
   64: (7)
  128: (8)
  256: (9)
  292: (3,3,3)
  349: (2,2,1,1,2,1)
  442: (1,2,1,1,2,2)
  512: (10)
  586: (3,3,2,2)
  676: (2,2,3,3)
  697: (2,2,1,1,3,1)
  826: (1,3,1,1,2,2)
		

Crossrefs

Non-recursive non-consecutive for partitions: A325755, counted by A325702.
Non-consecutive: A353431, counted by A353391.
Non-consecutive for partitions: A353393, counted by A353426.
Non-recursive non-consecutive: A353402, counted by A353390.
Counted by: A353430.
Non-recursive: A353432, counted by A353392.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order, run-lengths A333769.
Statistics of standard compositions:
- Length is A000120, sum A070939.
- Runs are counted by A124767, distinct A351014.
- Subsequences are counted by A334299, contiguous A124770/A124771.
- Runs-resistance is A333628.
Classes of standard compositions:
- Partitions are A114994, strict A333255, multisets A225620, sets A333256.
- Runs are A272919, counted by A000005.
- Golomb rulers are A333222, counted by A169942.
- Anti-runs are A333489, counted by A003242.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    yoyQ[y_]:=Length[y]<=1||MemberQ[Join@@Table[Take[y,{i,j}],{i,Length[y]},{j,i,Length[y]}],Length/@Split[y]]&&yoyQ[Length/@Split[y]];
    Select[Range[0,1000],yoyQ[stc[#]]&]