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-20 of 20 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.

A333192 Number of compositions of n with strictly increasing run-lengths.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 10, 14, 16, 24, 31, 37, 51, 67, 76, 103, 129, 158, 199, 242, 293, 370, 450, 538, 652, 799, 953, 1147, 1376, 1635, 1956, 2322, 2757, 3271, 3845, 4539, 5336, 6282, 7366, 8589, 10046, 11735, 13647, 15858, 18442, 21354, 24716, 28630, 32985
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(8) = 14 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (122)    (33)      (133)      (44)
                    (211)   (311)    (222)     (322)      (233)
                    (1111)  (2111)   (411)     (511)      (422)
                            (11111)  (3111)    (1222)     (611)
                                     (21111)   (4111)     (2222)
                                     (111111)  (22111)    (5111)
                                               (31111)    (11222)
                                               (211111)   (41111)
                                               (1111111)  (122111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
For example, the composition (1,2,2,1,1,1) has run-lengths (1,2,3), so is counted under a(8).
		

Crossrefs

The case of partitions is A100471.
The non-strict version is A332836.
Strictly increasing compositions are A000009.
Unimodal compositions are A001523.
Strict compositions are A032020.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions with strictly increasing or decreasing run-lengths are A333191.
Numbers with strictly increasing prime multiplicities are A334965.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@Length/@Split[#]&]],{n,0,15}]
    b[n_, lst_, v_] := b[n, lst, v] = If[n == 0, 1, If[n <= lst, 0, Sum[If[k == v, 0, b[n - k pz, pz, k]], {pz, lst + 1, n}, {k, Floor[n/pz]}]]]; a[n_] := b[n, 0, 0]; a /@ Range[0, 50] (* Giovanni Resta, May 18 2020 *)

Extensions

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

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

A337698 Number of compositions of n that are not strictly increasing.

Original entry on oeis.org

0, 0, 1, 2, 6, 13, 28, 59, 122, 248, 502, 1012, 2033, 4078, 8170, 16357, 32736, 65498, 131026, 262090, 524224, 1048500, 2097063, 4194200, 8388486, 16777074, 33554267, 67108672, 134217506, 268435200, 536870616, 1073741484, 2147483258, 4294966848, 8589934080
Offset: 0

Views

Author

Gus Wiseman, Oct 06 2020

Keywords

Examples

			The a(2) = 1 through a(5) = 13 compositions:
  (11)  (21)   (22)    (32)
        (111)  (31)    (41)
               (112)   (113)
               (121)   (122)
               (211)   (131)
               (1111)  (212)
                       (221)
                       (311)
                       (1112)
                       (1121)
                       (1211)
                       (2111)
                       (11111)
		

Crossrefs

A000009 counts the complement.
A047967 is the unordered version.
A056823 is the weak version.
A140106 counts the unordered case of length 3.
A242771 counts the case of length 3.
A333255 is the complement of a ranking sequence (using standard compositions A066099) for these compositions.
A337481 counts these compositions that are not strictly decreasing.
A337482 counts these compositions that are not weakly decreasing.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A218004 counts strictly increasing or weakly decreasing compositions.

Programs

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

Formula

a(n) = 2^(n-1) - A000009(n) for n > 0.

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