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.

A333191 Number of compositions of n whose run-lengths are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 2, 2, 5, 8, 10, 18, 24, 29, 44, 60, 68, 100, 130, 148, 201, 256, 310, 396, 478, 582, 736, 898, 1068, 1301, 1594, 1902, 2288, 2750, 3262, 3910, 4638, 5510, 6538, 7686, 9069, 10670, 12560, 14728, 17170, 20090, 23462, 27292, 31710, 36878, 42704, 49430
Offset: 0

Views

Author

Gus Wiseman, May 17 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(1) = 1 through a(7) = 18 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (113)    (33)      (115)
                    (112)   (122)    (114)     (133)
                    (211)   (221)    (222)     (223)
                    (1111)  (311)    (411)     (322)
                            (1112)   (1113)    (331)
                            (2111)   (3111)    (511)
                            (11111)  (11112)   (1114)
                                     (21111)   (1222)
                                     (111111)  (2221)
                                               (4111)
                                               (11113)
                                               (11122)
                                               (22111)
                                               (31111)
                                               (111112)
                                               (211111)
                                               (1111111)
		

Crossrefs

The non-strict version is A332835.
The case of partitions is A333190.
Unimodal compositions are A001523.
Strict compositions are A032020.
Partitions with distinct run-lengths are A098859.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Partitions with weakly decreasing run-lengths are A100882.
Partitions with weakly increasing run-lengths are A100883.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions whose run-lengths are unimodal or co-unimodal are A332746.
Compositions whose run-lengths are neither incr. nor decr. are A332833.
Compositions that are neither increasing nor decreasing are A332834.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are strictly incr. or strictly decr. are A333147.
Compositions with strictly increasing run-lengths are A333192.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Less@@Length/@Split[#],Greater@@Length/@Split[#]]&]],{n,0,15}]

Formula

a(n > 0) = 2*A333192(n) - A000005(n).

Extensions

Terms a(26) and beyond from Giovanni Resta, May 19 2020