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.

Previous Showing 11-12 of 12 results.

A332871 Number of compositions of n whose run-lengths are not weakly increasing.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 8, 24, 55, 128, 282, 625, 1336, 2855, 6000, 12551, 26022, 53744, 110361, 225914, 460756, 937413, 1902370, 3853445, 7791647, 15732468, 31725191, 63907437, 128613224, 258626480, 519700800, 1043690354, 2094882574, 4202903667, 8428794336, 16897836060
Offset: 0

Views

Author

Gus Wiseman, Feb 29 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Also compositions whose run-lengths are not weakly decreasing.

Examples

			The a(4) = 1 through a(6) = 8 compositions:
  (112)  (113)   (114)
         (221)   (1113)
         (1112)  (1131)
         (1121)  (1221)
                 (2112)
                 (11112)
                 (11121)
                 (11211)
For example, the composition (2,1,1,2) has run-lengths (1,2,1), which are not weakly increasing, so (2,1,1,2) is counted under a(6).
		

Crossrefs

The version for the compositions themselves (not run-lengths) is A056823.
The version for unsorted prime signature is A112769, with dual A071365.
The case without weakly decreasing run-lengths either is A332833.
The complement is counted by A332836.
Compositions that are not unimodal are A115981.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are not unimodal are A332727.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!LessEqual@@Length/@Split[#]&]],{n,0,10}]

Formula

a(n) = 2^(n - 1) - A332836(n).

Extensions

Terms a(21) and beyond from Andrew Howroyd, Dec 30 2020

A375408 Numbers k such that the k-th composition in standard order is not weakly increasing or weakly decreasing.

Original entry on oeis.org

13, 22, 25, 27, 29, 38, 41, 44, 45, 46, 49, 50, 51, 53, 54, 55, 57, 59, 61, 70, 76, 77, 78, 81, 82, 83, 86, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 134, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2024

Keywords

Comments

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 and corresponding compositions begin:
  13: (1,2,1)
  22: (2,1,2)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  38: (3,1,2)
  41: (2,3,1)
  44: (2,1,3)
  45: (2,1,2,1)
  46: (2,1,1,2)
  49: (1,4,1)
  50: (1,3,2)
  51: (1,3,1,1)
  53: (1,2,2,1)
  54: (1,2,1,2)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
		

Crossrefs

The version for run-lengths of compositions is A332833.
Compositions of this type are counted by A332834, complement maybe A329398.
A001523 counts unimodal compositions, ranks too dense.
A011782 counts compositions.
A114994 ranks weakly decreasing compositions, complement A335485.
A115981 counts non-unimodal compositions, ranked by A335373.
A225620 ranks weakly increasing compositions, complement A335486.
A238130, A238279, A333755 count compositions by number of runs.
A332835 counts compositions with weakly incr. or weakly decr. run-lengths.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!LessEqual@@stc[#]&&!GreaterEqual@@stc[#]&]

Formula

Intersection of A335485 and A335486.
Previous Showing 11-12 of 12 results.