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.

A332727 Number of compositions of n whose run-lengths are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 8, 28, 74, 188, 468, 1120, 2596, 5944, 13324, 29437, 64288, 138929, 297442, 632074, 1333897, 2798352, 5840164, 12132638, 25102232, 51750419, 106346704, 217921161, 445424102, 908376235, 1848753273, 3755839591, 7617835520, 15428584567, 31207263000
Offset: 0

Views

Author

Gus Wiseman, Feb 29 2020

Keywords

Comments

A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(6) = 1 through a(8) = 8 compositions:
  (11211)  (11311)   (11411)
           (111211)  (111311)
           (112111)  (112112)
                     (113111)
                     (211211)
                     (1111211)
                     (1112111)
                     (1121111)
		

Crossrefs

Looking at the composition itself (not its run-lengths) gives A115981.
The case of partitions is A332281, with complement counted by A332280.
The complement is counted by A332726.
Unimodal compositions are A001523.
Non-unimodal normal sequences are A328509.
Compositions with normal run-lengths are A329766.
Numbers whose prime signature is not unimodal are A332282.
Partitions whose 0-appended first differences are unimodal are A332283, with complement A332284, with Heinz numbers A332287.
Compositions whose negation is not unimodal are A332669.
Compositions whose run-lengths are weakly increasing are A332836.

Programs

  • Mathematica
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]]
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!unimodQ[Length/@Split[#]]&]],{n,0,10}]

Formula

a(n) + A332726(n) = 2^(n - 1).

Extensions

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