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.

Showing 1-10 of 19 results. Next

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

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 14, 36, 88, 199, 432, 914, 1900, 3896, 7926, 16036, 32311, 64944, 130308, 261166, 523040, 1046996, 2095152, 4191796, 8385466, 16773303, 33549564, 67102848, 134210298, 268426328, 536859712, 1073728142, 2147466956, 4294947014, 8589909976
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.

Examples

			The a(4) = 1 through a(6) = 14 compositions:
  (121)  (131)   (132)
         (212)   (141)
         (1121)  (213)
         (1211)  (231)
                 (312)
                 (1131)
                 (1212)
                 (1221)
                 (1311)
                 (2112)
                 (2121)
                 (11121)
                 (11211)
                 (12111)
		

Crossrefs

The version for unsorted prime signature is A332831.
The version for run-lengths of compositions is A332833.
The complement appears to be counted by A329398.
Unimodal compositions are A001523.
Compositions that are not unimodal are A115981.
Partitions with weakly increasing or decreasing run-lengths are A332745.
Compositions with weakly increasing or decreasing run-lengths are A332835.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are neither unimodal nor is their negation are A332870.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!Or[LessEqual@@#,GreaterEqual@@#]&]],{n,0,10}]
  • PARI
    a(n)={if(n==0, 0, 2^(n-1) - 2*numbpart(n) + numdiv(n))} \\ Andrew Howroyd, Dec 30 2020

Formula

a(n) = 2^(n - 1) - 2 * A000041(n) + A000005(n).

A332833 Number of compositions of n whose run-lengths are neither weakly increasing nor weakly decreasing.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 3, 8, 27, 75, 185, 441, 1025, 2276, 4985, 10753, 22863, 48142, 100583, 208663, 430563, 884407, 1809546, 3690632, 7506774, 15233198, 30851271, 62377004, 125934437, 253936064, 511491634, 1029318958, 2069728850, 4158873540, 8351730223, 16762945432
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.

Examples

			The a(6) = 3 and a(7) = 8 compositions:
  (1221)   (2113)
  (2112)   (3112)
  (11211)  (11311)
           (12112)
           (21112)
           (21121)
           (111211)
           (112111)
		

Crossrefs

The case of partitions is A332641.
The version for unsorted prime signature is A332831.
The version for the compositions themselves (not run-lengths) is A332834.
The complement is counted by A332835.
Unimodal compositions are A001523.
Partitions with weakly increasing run-lengths are A100883.
Compositions that are not unimodal are A115981.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions whose run-lengths are not unimodal are A332727.
Partitions with weakly increasing or weakly decreasing run-lengths: A332745.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are neither unimodal nor is their negation are A332870.

Programs

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

Formula

a(n) = 2^(n - 1) - 2 * A332836(n) + A329738(n).

Extensions

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

A332835 Number of compositions of n whose run-lengths are either weakly increasing or weakly decreasing.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 29, 56, 101, 181, 327, 583, 1023, 1820, 3207, 5631, 9905, 17394, 30489, 53481, 93725, 164169, 287606, 503672, 881834, 1544018, 2703161, 4731860, 8283291, 14499392, 25379278, 44422866, 77754798, 136093756, 238204369, 416923752, 729728031
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.

Examples

			The a(6) = 29 compositions:
  (6)    (141)  (213)   (1113)  (21111)
  (51)   (114)  (132)   (222)   (12111)
  (15)   (33)   (123)   (2211)  (11121)
  (42)   (321)  (3111)  (2121)  (11112)
  (24)   (312)  (1311)  (1212)  (111111)
  (411)  (231)  (1131)  (1122)
Missing are: (2112), (1221), (11211).
		

Crossrefs

The version for the compositions themselves (not run-lengths) is A329398.
Compositions with equal run-lengths are A329738.
The case of partitions is A332745.
The version for unsorted prime signature is the complement of A332831.
The complement is counted by A332833.
Unimodal compositions are A001523.
Partitions with weakly decreasing run-lengths are A100882.
Partitions with weakly increasing run-lengths are A100883.
Compositions that are not unimodal are A115981.
Compositions whose negation is unimodal are A332578.
Compositions whose run-lengths are unimodal are A332726.
Neither weakly increasing nor weakly decreasing compositions are A332834.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are neither unimodal nor is their negation are A332870.

Programs

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

Formula

a(n) = 2 * A332836(n) - A329738(n).

Extensions

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

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 9, 32, 92, 243, 587, 1361, 3027, 6564, 13928, 29127, 60180, 123300, 250945, 508326, 1025977, 2065437, 4150056, 8327344, 16692844, 33438984, 66951671, 134004892, 268148573, 536486146, 1073227893, 2146800237, 4294061970, 8588740071, 17178298617
Offset: 0

Views

Author

Gus Wiseman, Mar 02 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) = 2 and a(7) = 9 compositions:
  (1212)  (1213)
  (2121)  (1312)
          (2131)
          (3121)
          (11212)
          (12112)
          (12121)
          (21121)
          (21211)
		

Crossrefs

The case of run-lengths of partitions is A332640.
The version for unsorted prime signature is A332643.
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.
Partitions with weakly increasing or decreasing run-lengths are A332745.
Compositions that are neither weakly increasing nor decreasing are A332834.
Compositions with weakly increasing or 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],!unimodQ[#]&&!unimodQ[-#]&]],{n,0,10}]

Formula

a(n) = 2^(n-1) - A001523(n) - A332578(n) + 2*A000041(n) - A000005(n) for n > 0. - Andrew Howroyd, Dec 30 2020

Extensions

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

A332640 Number of integer partitions of n such that neither the run-lengths nor the negated run-lengths are unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 12, 17, 29, 44, 66, 92, 138, 187, 266, 359, 492, 649, 877, 1140, 1503, 1938, 2517, 3202, 4111, 5175, 6563, 8209, 10297, 12763, 15898, 19568, 24152, 29575, 36249, 44090, 53737, 65022, 78752, 94873, 114294
Offset: 0

Views

Author

Gus Wiseman, Feb 25 2020

Keywords

Comments

A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.

Examples

			The a(14) = 1 through a(18) = 12 partitions:
  (433211)  (533211)   (443221)    (544211)     (544311)
            (4332111)  (633211)    (733211)     (553221)
                       (5332111)   (4333211)    (644211)
                       (43321111)  (6332111)    (833211)
                                   (53321111)   (4432221)
                                   (433211111)  (5333211)
                                                (5442111)
                                                (7332111)
                                                (43332111)
                                                (63321111)
                                                (533211111)
                                                (4332111111)
For example, the partition (4,3,3,2,1,1) has run-lengths (1,2,1,2), so is counted under a(14).
		

Crossrefs

Looking only at the original run-lengths gives A332281.
Looking only at the negated run-lengths gives A332639.
The Heinz numbers of these partitions are A332643.
The complement is counted by A332746.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Partitions with unimodal run-lengths are A332280.
Partitions whose negated run-lengths are unimodal are A332638.
Run-lengths and negated run-lengths are not both unimodal: A332641.
Compositions whose negation is not unimodal are A332669.
Run-lengths and negated run-lengths are both unimodal: A332745.

Programs

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

A332831 Numbers whose unsorted prime signature is neither weakly increasing nor weakly decreasing.

Original entry on oeis.org

90, 126, 198, 234, 270, 300, 306, 342, 350, 378, 414, 522, 525, 540, 550, 558, 588, 594, 600, 630, 650, 666, 702, 738, 756, 774, 810, 825, 846, 850, 918, 950, 954, 975, 980, 990, 1026, 1050, 1062, 1078, 1098, 1134, 1150, 1170, 1176, 1188, 1200, 1206, 1242
Offset: 1

Views

Author

Gus Wiseman, Mar 02 2020

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.

Examples

			The sequence of terms together with their prime indices begins:
   90: {1,2,2,3}
  126: {1,2,2,4}
  198: {1,2,2,5}
  234: {1,2,2,6}
  270: {1,2,2,2,3}
  300: {1,1,2,3,3}
  306: {1,2,2,7}
  342: {1,2,2,8}
  350: {1,3,3,4}
  378: {1,2,2,2,4}
  414: {1,2,2,9}
  522: {1,2,2,10}
  525: {2,3,3,4}
  540: {1,1,2,2,2,3}
  550: {1,3,3,5}
  558: {1,2,2,11}
  588: {1,1,2,4,4}
  594: {1,2,2,2,5}
  600: {1,1,1,2,3,3}
  630: {1,2,2,3,4}
For example, the prime signature of 540 is (2,3,1), so 540 is in the sequence.
		

Crossrefs

The version for run-lengths of partitions is A332641.
The version for run-lengths of compositions is A332833.
The version for compositions is A332834.
Prime signature is A124010.
Unimodal compositions are A001523.
Partitions with weakly increasing run-lengths are A100883.
Partitions with weakly increasing or decreasing run-lengths are A332745.
Compositions with weakly increasing or decreasing run-lengths are A332835.
Compositions with weakly increasing run-lengths are A332836.

Programs

  • Mathematica
    Select[Range[1000],!Or[LessEqual@@Last/@FactorInteger[#],GreaterEqual@@Last/@FactorInteger[#]]&]

Formula

Intersection of A071365 and A112769.

A332641 Number of integer partitions of n whose run-lengths are neither weakly increasing nor weakly decreasing.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 5, 9, 14, 22, 33, 48, 69, 96, 136, 184, 248, 330, 443, 574, 756, 970, 1252, 1595, 2040, 2558, 3236, 4041, 5054, 6256, 7781, 9547, 11782, 14394, 17614, 21423, 26083, 31501, 38158, 45930, 55299, 66262, 79477, 94803, 113214
Offset: 0

Views

Author

Gus Wiseman, Feb 26 2020

Keywords

Comments

Also partitions whose run-lengths and negated run-lengths are not both unimodal. A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.

Examples

			The a(8) = 1 through a(13) = 14 partitions:
  (3221)  (4221)  (5221)   (4331)    (4332)     (5332)
                  (32221)  (6221)    (5331)     (6331)
                  (33211)  (42221)   (7221)     (8221)
                           (322211)  (43221)    (43321)
                           (332111)  (44211)    (44311)
                                     (52221)    (53221)
                                     (322221)   (62221)
                                     (422211)   (332221)
                                     (3321111)  (333211)
                                                (422221)
                                                (442111)
                                                (522211)
                                                (3222211)
                                                (33211111)
		

Crossrefs

The complement is counted by A332745.
The Heinz numbers of these partitions are A332831.
The case of run-lengths of compositions is A332833.
Partitions whose run-lengths are weakly increasing are A100883.
Partitions whose run-lengths are weakly decreasing are A100882.
Partitions whose run-lengths are not unimodal are A332281.
Partitions whose negated run-lengths are not unimodal are A332639.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Partitions with unimodal run-lengths are A332280.
Partitions whose negated run-lengths are unimodal are A332638.
Compositions whose negation is not unimodal are A332669.
The case of run-lengths of compositions is A332833.
Compositions that are neither increasing nor decreasing are A332834.

Programs

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

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

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 24, 40, 73, 128, 230, 399, 712, 1241, 2192, 3833, 6746, 11792, 20711, 36230, 63532, 111163, 194782, 340859, 596961, 1044748, 1829241, 3201427, 5604504, 9808976, 17170112, 30051470, 52601074, 92063629, 161140256, 282033124, 493637137, 863982135, 1512197655
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 weakly decreasing.

Examples

			The a(0) = 1 through a(5) = 12 compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (13)    (14)
                 (21)   (22)    (23)
                 (111)  (31)    (32)
                        (121)   (41)
                        (211)   (122)
                        (1111)  (131)
                                (212)
                                (311)
                                (1211)
                                (2111)
                                (11111)
For example, the composition (2,3,2,2,1,1,2,2,2) has run-lengths (1,1,2,2,3) so is counted under a(17).
		

Crossrefs

The version for the compositions themselves (not run-lengths) is A000041.
The case of partitions is A100883.
The case of unsorted prime signature is A304678, with dual A242031.
Permitting the run-lengths to be weakly decreasing also gives A332835.
The complement is counted by A332871.
Unimodal compositions are A001523.
Compositions that are not unimodal are A115981.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],LessEqual@@Length/@Split[#]&]],{n,0,10}]
  • PARI
    step(M, m)={my(n=matsize(M)[1]); for(p=m+1, n, my(v=vector((p-1)\m, i, M[p-i*m,i]), s=vecsum(v)); M[p,]+=vector(#M,i,s-if(i<=#v, v[i]))); M}
    seq(n)={my(M=matrix(n+1, n, i, j, i==1)); for(m=1, n, M=step(M, m)); M[1,n]=0; vector(n+1, i, vecsum(M[i,]))/(n-1)} \\ Andrew Howroyd, Dec 31 2020

Extensions

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

A332746 Number of integer partitions of n such that either the run-lengths or the negated run-lengths are unimodal.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 134, 174, 227, 291, 373, 473, 598, 748, 936, 1163, 1437, 1771, 2170, 2651, 3226, 3916, 4727, 5702, 6846, 8205, 9793, 11681, 13866, 16462, 19452, 22976, 27041, 31820, 37276, 43693, 51023, 59559, 69309, 80664
Offset: 0

Views

Author

Gus Wiseman, Feb 27 2020

Keywords

Comments

First differs from A000041 at a(14) = 134, A000041(14) = 135.
A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.

Examples

			The only partition not counted under a(14) = 134 is (4,3,3,2,1,1), whose run-lengths (1,2,1,2) are neither unimodal nor is their negation.
		

Crossrefs

Looking only at the original run-lengths gives A332281.
Looking only at the negated run-lengths gives A332639.
The complement is counted by A332640.
The Heinz numbers of partitions not in this class are A332643.
Unimodal compositions are A001523.
Partitions with unimodal run-lengths are A332280.
Compositions whose negation is unimodal are A332578.
Partitions whose negated run-lengths are unimodal are A332638.
Run-lengths are neither weakly increasing nor weakly decreasing: A332641.
Run-lengths and negated run-lengths are both unimodal: A332745.

Programs

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

A337484 Number of ordered triples of positive integers summing to n that are neither strictly increasing nor strictly decreasing.

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 8, 13, 17, 22, 28, 35, 41, 50, 58, 67, 77, 88, 98, 111, 123, 136, 150, 165, 179, 196, 212, 229, 247, 266, 284, 305, 325, 346, 368, 391, 413, 438, 462, 487, 513, 540, 566, 595, 623, 652, 682, 713, 743, 776, 808, 841, 875, 910, 944, 981, 1017
Offset: 0

Views

Author

Gus Wiseman, Sep 11 2020

Keywords

Examples

			The a(3) = 1 through a(7) = 13 triples:
  (1,1,1)  (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)
           (1,2,1)  (1,2,2)  (1,3,2)  (1,3,3)
           (2,1,1)  (1,3,1)  (1,4,1)  (1,4,2)
                    (2,1,2)  (2,1,3)  (1,5,1)
                    (2,2,1)  (2,2,2)  (2,1,4)
                    (3,1,1)  (2,3,1)  (2,2,3)
                             (3,1,2)  (2,3,2)
                             (4,1,1)  (2,4,1)
                                      (3,1,3)
                                      (3,2,2)
                                      (3,3,1)
                                      (4,1,2)
                                      (5,1,1)
		

Crossrefs

A140106 is the unordered case.
A242771 allows strictly increasing but not strictly decreasing triples.
A337481 counts these compositions of any length.
A001399(n - 6) counts unordered strict triples.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A069905 counts unordered triples.
A218004 counts strictly increasing or weakly decreasing compositions.
A332745 counts partitions with weakly increasing or weakly decreasing run-lengths.
A332835 counts compositions with weakly increasing or weakly decreasing run-lengths.
A337483 counts triples either weakly increasing or weakly decreasing.

Programs

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

Formula

a(n) = 2*A242771(n - 1) - A000217(n - 1), n > 0.
2*A001399(n - 6) = 2*A069905(n - 3) = 2*A211540(n - 1) is the complement.
4*A001399(n - 6) = 4*A069905(n - 3) = 4*A211540(n - 1) is the strict case.
Conjectures from Colin Barker, Sep 13 2020: (Start)
G.f.: x^3*(1 + 2*x + 2*x^2 - x^3) / ((1 - x)^3*(1 + x)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n>6.
(End)
Showing 1-10 of 19 results. Next