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-16 of 16 results.

A333147 Number of compositions of n that are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 7, 9, 11, 15, 19, 23, 29, 35, 43, 53, 63, 75, 91, 107, 127, 151, 177, 207, 243, 283, 329, 383, 443, 511, 591, 679, 779, 895, 1023, 1169, 1335, 1519, 1727, 1963, 2225, 2519, 2851, 3219, 3631, 4095, 4607, 5179, 5819, 6527, 7315, 8193, 9163
Offset: 0

Views

Author

Gus Wiseman, May 16 2020

Keywords

Comments

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

Examples

			The a(1) = 1 through a(9) = 15 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)      (9)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)    (1,7)    (1,8)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)    (2,6)    (2,7)
                          (3,2)  (4,2)    (3,4)    (3,5)    (3,6)
                          (4,1)  (5,1)    (4,3)    (5,3)    (4,5)
                                 (1,2,3)  (5,2)    (6,2)    (5,4)
                                 (3,2,1)  (6,1)    (7,1)    (6,3)
                                          (1,2,4)  (1,2,5)  (7,2)
                                          (4,2,1)  (1,3,4)  (8,1)
                                                   (4,3,1)  (1,2,6)
                                                   (5,2,1)  (1,3,5)
                                                            (2,3,4)
                                                            (4,3,2)
                                                            (5,3,1)
                                                            (6,2,1)
		

Crossrefs

Strict partitions are A000009.
Unimodal compositions are A001523 (strict: A072706).
Strict compositions are A032020.
The non-strict version appears to be A329398.
Partitions with incr. or decr. run-lengths are A332745 (strict: A333190).
Compositions with incr. or decr. run-lengths are A332835 (strict: A333191).
The complement is counted by A333149 (non-strict: A332834).

Programs

  • Mathematica
    Table[2*PartitionsQ[n]-1,{n,0,30}]

Formula

a(n) = 2*A000009(n) - 1.

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

A332874 Number of strict compositions of n that are neither unimodal nor is their negation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 20, 30, 50, 150, 180, 290, 420, 630, 860, 1828, 2168, 3326, 4514, 6530, 8576, 12188, 20096, 25314, 35576, 48062, 65592, 86752, 117222, 152060, 237590, 292346, 402798, 524596, 711270, 910606, 1221204, 1554382, 2044460, 2927124
Offset: 0

Views

Author

Gus Wiseman, Mar 04 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. It is strict if there are not repeated parts.

Examples

			The a(10) = 10 through a(12) = 20 compositions:
  (1,3,2,4)  (1,3,2,5)  (1,3,2,6)
  (1,4,2,3)  (1,5,2,3)  (1,4,2,5)
  (2,1,4,3)  (2,1,5,3)  (1,5,2,4)
  (2,3,1,4)  (2,3,1,5)  (1,6,2,3)
  (2,4,1,3)  (2,5,1,3)  (2,1,5,4)
  (3,1,4,2)  (3,1,5,2)  (2,1,6,3)
  (3,2,4,1)  (3,2,5,1)  (2,3,1,6)
  (3,4,1,2)  (3,5,1,2)  (2,4,1,5)
  (4,1,3,2)  (5,1,3,2)  (2,5,1,4)
  (4,2,3,1)  (5,2,3,1)  (2,6,1,3)
                        (3,1,6,2)
                        (3,2,6,1)
                        (3,6,1,2)
                        (4,1,5,2)
                        (4,2,5,1)
                        (4,5,1,2)
                        (5,1,4,2)
                        (5,2,4,1)
                        (6,1,3,2)
                        (6,2,3,1)
		

Crossrefs

The non-strict version for unsorted prime signature is A332643.
The non-strict version is A332870.
Unimodal compositions are A001523.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Compositions whose negation is unimodal are A332578.
Compositions whose negation is not unimodal are A332669.
Compositions with neither weakly increasing nor weakly decreasing run-lengths are A332833.
Compositions with weakly increasing or weakly decreasing run-lengths are A332835.

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],UnsameQ@@#&&!unimodQ[#]&&!unimodQ[-#]&]],{n,0,20}]
  • PARI
    seq(n)={my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); Vec(sum(k=4, n, (k! - 2^k + 2)*polcoef(p,k,y)), -(n+1))} \\ Andrew Howroyd, Apr 16 2021

Formula

G.f.: Sum_{k>=4} (k! - 2^k + 2) * [y^k](Product_{j>=1} 1 + y*x^j). - Andrew Howroyd, Apr 16 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Apr 16 2021

A333149 Number of strict compositions of n that are neither increasing nor decreasing.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 4, 4, 8, 12, 38, 42, 72, 98, 150, 298, 372, 542, 760, 1070, 1428, 2600, 3120, 4550, 6050, 8478, 10976, 15220, 23872, 29950, 41276, 55062, 74096, 97148, 129786, 167256, 256070, 314454, 429338, 556364, 749266, 955746, 1275016, 1618054
Offset: 0

Views

Author

Gus Wiseman, May 16 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. It is strict if there are no repeated parts.

Examples

			The a(6) = 4 through a(9) = 12 compositions:
  (1,3,2)  (1,4,2)  (1,4,3)  (1,5,3)
  (2,1,3)  (2,1,4)  (1,5,2)  (1,6,2)
  (2,3,1)  (2,4,1)  (2,1,5)  (2,1,6)
  (3,1,2)  (4,1,2)  (2,5,1)  (2,4,3)
                    (3,1,4)  (2,6,1)
                    (3,4,1)  (3,1,5)
                    (4,1,3)  (3,2,4)
                    (5,1,2)  (3,4,2)
                             (3,5,1)
                             (4,2,3)
                             (5,1,3)
                             (6,1,2)
		

Crossrefs

The non-strict case is A332834.
The complement is counted by A333147.
Strict partitions are A000009.
Strict compositions are A032020.
Non-unimodal strict compositions are A072707.
Strict partitions with increasing or decreasing run-lengths are A333190.
Strict compositions with increasing or decreasing run-lengths are A333191.
Unimodal compositions are A001523, with strict case A072706.

Programs

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

Formula

a(n) = A032020(n) - 2*A000009(n) + 1.

A333190 Number of integer partitions of n whose run-lengths are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 10, 13, 15, 21, 26, 29, 39, 49, 50, 68, 80, 92, 109, 129, 142, 181, 201, 227, 262, 317, 343, 404, 456, 516, 589, 677, 742, 870, 949, 1077, 1207, 1385, 1510, 1704, 1895, 2123, 2352, 2649, 2877, 3261, 3571, 3966, 4363, 4873, 5300, 5914, 6466
Offset: 0

Views

Author

Gus Wiseman, May 17 2020

Keywords

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (2111)   (411)     (511)      (422)
                            (11111)  (3111)    (2221)     (611)
                                     (21111)   (4111)     (2222)
                                     (111111)  (22111)    (5111)
                                               (31111)    (22211)
                                               (211111)   (41111)
                                               (1111111)  (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The non-strict version is A332745.
The generalization to compositions is A333191.
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.
Partitions with unimodal run-lengths are A332280.
Partitions whose run-lengths are not increasing nor decreasing are A332641.
Compositions whose run-lengths are unimodal or co-unimodal are A332746.
Compositions that are neither increasing nor decreasing are A332834.
Strictly increasing or strictly decreasing compositions are A333147.
Compositions with strictly increasing run-lengths are A333192.
Numbers with strictly increasing prime multiplicities are A334965.

Programs

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

A337482 Number of compositions of n that are neither strictly increasing nor weakly decreasing.

Original entry on oeis.org

0, 0, 0, 0, 2, 7, 18, 45, 101, 219, 461, 957, 1957, 3978, 8036, 16182, 32506, 65202, 130642, 261601, 523598, 1047709, 2096062, 4192946, 8386912, 16775117, 33551832, 67105663, 134213789, 268430636, 536865013, 1073734643, 2147474910, 4294956706, 8589921771
Offset: 0

Views

Author

Gus Wiseman, Sep 11 2020

Keywords

Comments

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

Examples

			The a(4) = 2 through a(4) = 18 compositions:
  (112)  (113)   (114)
  (121)  (122)   (132)
         (131)   (141)
         (212)   (213)
         (1112)  (231)
         (1121)  (312)
         (1211)  (1113)
                 (1122)
                 (1131)
                 (1212)
                 (1221)
                 (1311)
                 (2112)
                 (2121)
                 (11112)
                 (11121)
                 (11211)
                 (12111)
		

Crossrefs

Ranked by the complement of the intersection of A114994 and A333255.
A128422 counts only the case of length 3.
A218004 counts the complement.
A332834 is the weak version.
A337481 is the strict version.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A332745/A332835 count partitions/compositions with weakly increasing or weakly decreasing run-lengths.

Programs

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

Formula

a(n) = 2^(n-1) - A000009(n) - A000041(n) + 1, n > 0.
Previous Showing 11-16 of 16 results.