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 15 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).

A332281 Number of integer partitions of n whose run-lengths are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 4, 6, 10, 16, 24, 33, 51, 70, 100, 137, 189, 250, 344, 450, 597, 778, 1019, 1302, 1690, 2142, 2734, 3448, 4360, 5432, 6823, 8453, 10495, 12941, 15968, 19529, 23964, 29166, 35525, 43054, 52173, 62861, 75842, 91013, 109208
Offset: 0

Views

Author

Gus Wiseman, Feb 19 2020

Keywords

Comments

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

Examples

			The a(10) = 1 through a(15) = 10 partitions:
  (33211)  (332111)  (44211)    (44311)     (55211)      (44322)
                     (3321111)  (333211)    (433211)     (55311)
                                (442111)    (443111)     (443211)
                                (33211111)  (3332111)    (533211)
                                            (4421111)    (552111)
                                            (332111111)  (4332111)
                                                         (4431111)
                                                         (33321111)
                                                         (44211111)
                                                         (3321111111)
		

Crossrefs

The complement is counted by A332280.
The Heinz numbers of these partitions are A332282.
The opposite version is A332639.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.

Programs

  • Maple
    b:= proc(n, i, m, t) option remember; `if`(n=0, 1,
         `if`(i<1, 0, add(b(n-i*j, i-1, j, t and j>=m),
          j=1..min(`if`(t, [][], m), n/i))+b(n, i-1, m, t)))
        end:
    a:= n-> combinat[numbpart](n)-b(n$2, 0, true):
    seq(a(n), n=0..65);  # Alois P. Heinz, Feb 20 2020
  • 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[#]]&]],{n,0,30}]
    (* Second program: *)
    b[n_, i_, m_, t_] := b[n, i, m, t] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, j, t && j >= m], {j, 1, Min[If[t, Infinity, m], n/i]}] + b[n, i - 1, m, t]]];
    a[n_] := PartitionsP[n] - b[n, n, 0, True];
    a /@ Range[0, 65] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

A332639 Number of integer partitions of n whose negated run-lengths are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 4, 7, 10, 17, 25, 36, 51, 75, 102, 143, 192, 259, 346, 462, 599, 786, 1014, 1309, 1670, 2133, 2686, 3402, 4258, 5325, 6623, 8226, 10134, 12504, 15328, 18779, 22878, 27870, 33762, 40916, 49349, 59457, 71394, 85679, 102394
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(8) = 1 through a(13) = 10 partitions:
  (3221)  (4221)  (5221)   (4331)    (4332)    (5332)
                  (32221)  (6221)    (5331)    (6331)
                           (42221)   (7221)    (8221)
                           (322211)  (43221)   (43321)
                                     (52221)   (53221)
                                     (322221)  (62221)
                                     (422211)  (332221)
                                               (422221)
                                               (522211)
                                               (3222211)
		

Crossrefs

The version for normal sequences is A328509.
The non-negated complement is A332280.
The non-negated version is A332281.
The complement is counted by A332638.
The case that is not unimodal either is A332640.
The Heinz numbers of these partitions are A332642.
The generalization to run-lengths of compositions is A332727.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Compositions whose negation is not unimodal are A332669.

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[#]]&]],{n,0,30}]

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

A332745 Number of integer partitions of n whose run-lengths are either weakly increasing or weakly decreasing.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 21, 29, 39, 51, 68, 87, 113, 143, 183, 228, 289, 354, 443, 544, 672, 812, 1001, 1202, 1466, 1758, 2123, 2525, 3046, 3606, 4308, 5089, 6054, 7102, 8430, 9855, 11621, 13571, 15915, 18500, 21673, 25103, 29245, 33835, 39296, 45277, 52470
Offset: 0

Views

Author

Gus Wiseman, Feb 29 2020

Keywords

Comments

Also partitions whose run-lengths and negated run-lengths are both unimodal.

Examples

			The a(8) = 21 partitions are:
  (8)     (44)     (2222)
  (53)    (332)    (22211)
  (62)    (422)    (32111)
  (71)    (431)    (221111)
  (521)   (3311)   (311111)
  (611)   (4211)   (2111111)
  (5111)  (41111)  (11111111)
Missing from this list is only (3221).
		

Crossrefs

The complement is counted by A332641.
The Heinz numbers of partitions not in this class are A332831.
The case of run-lengths of compositions is A332835.
Only weakly decreasing is A100882.
Only weakly increasing is A100883.
Unimodal compositions are A001523.
Non-unimodal compositions are A115981.
Partitions with unimodal run-lengths are A332280.
Partitions whose negated run-lengths are unimodal are A332638.
Compositions with unimodal run-lengths are A332726.
Compositions that are neither weakly increasing nor decreasing are A332834.

Programs

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

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.

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
Showing 1-10 of 15 results. Next