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 13 results. Next

A001523 Number of stacks, or planar partitions of n; also weakly unimodal compositions of n.

Original entry on oeis.org

1, 1, 2, 4, 8, 15, 27, 47, 79, 130, 209, 330, 512, 784, 1183, 1765, 2604, 3804, 5504, 7898, 11240, 15880, 22277, 31048, 43003, 59220, 81098, 110484, 149769, 202070, 271404, 362974, 483439, 641368, 847681, 1116325, 1464999, 1916184, 2498258, 3247088, 4207764
Offset: 0

Views

Author

Keywords

Comments

a(n) counts stacks of integer-length boards of total length n where no board overhangs the board underneath.
Number of graphical partitions on 2n nodes that contain a 1. E.g. a(3)=4 and so there are 4 graphical partitions of 6 that contain a 1, namely (111111), (21111), (2211) and (3111). Only (222) fails. - Jon Perry, Jul 25 2003
It would seem from Stanley that he regards a(0)=0 for this sequence and A001522. - Michael Somos, Feb 22 2015
In the article by Auluck is a typo in the formula (24), 2*Pi is missing in an exponent on the left side of the equation for Q(n). The correct term is exp(2*Pi*sqrt(n/3)), not just exp(sqrt(n/3)). - Vaclav Kotesovec, Jun 22 2015

Examples

			For a(4)=8 we have the following stacks:
x
x x. .x
x x. .x x.. .x. ..x xx
x xx xx xxx xxx xxx xx xxxx
G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 27*x^6 + 47*x^7 + 79*x^8 + ...
From _Gus Wiseman_, Mar 04 2020: (Start)
The a(1) = 1 through a(5) = 15 unimodal compositions:
  (1)  (2)   (3)    (4)     (5)
       (11)  (12)   (13)    (14)
             (21)   (22)    (23)
             (111)  (31)    (32)
                    (112)   (41)
                    (121)   (113)
                    (211)   (122)
                    (1111)  (131)
                            (221)
                            (311)
                            (1112)
                            (1121)
                            (1211)
                            (2111)
                            (11111)
(End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see section 2.5 on page 76.

Crossrefs

Cf. A000569. Bisections give A100505, A100506.
Row sums of A247255.
Row sums of A072704.
The strict case is A072706.
The complement is counted by A115981.
The case covering an initial interval is A227038.
The version whose negation is unimodal as well appears to be A329398.
Unimodal sequences covering an initial interval are A007052.
Non-unimodal permutations are A059204.
Non-unimodal sequences covering an initial interval are A328509.
Partitions with unimodal run-lengths are A332280.
Numbers whose prime signature is not unimodal are A332282.
Partitions whose 0-appended first differences are unimodal are A332283.
The number of unimodal permutations of the prime indices of n is A332288.
Compositions whose negation is unimodal are A332578.
Compositions whose run-lengths are unimodal are A332726.

Programs

  • Magma
    m:=100;
    R:=PowerSeriesRing(Integers(), m);
    Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) )); // G. C. Greubel, Apr 03 2023
  • Maple
    b:= proc(n, i) option remember;
          `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+
          add(b(n-i*j, i+1)*(j+1), j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(n, 1)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 26 2014
  • Mathematica
    max = 40; s = 1 + Sum[(-1)^(k + 1)*q^(k*(k + 1)/2), {k, 1, max}] / QPochhammer[q]^2 + O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Jan 25 2012, updated Nov 29 2015 *)
    b[n_, i_] := b[n, i] = If[i>n, 0, If[Mod[n, i]==0, 1, 0] + Sum[b[n-i*j, i+1]*(j+1), {j, 0, n/i}]]; a[n_] := If[n==0, 1, b[n, 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 24 2015, after Alois P. Heinz *)
    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[#]&]],{n,0,10}] (* Gus Wiseman, Mar 04 2020 *)
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( sum(k=1, (sqrt(1 + 8*n) - 1)\2, -(-1)^k * x^((k + k^2)/2)) / eta(x + x * O(x^n))^2 ,n))}; /* Michael Somos, Jul 22 2003 */
    
  • Python
    def b(n, i):
        if i>n: return 0
        if n%i==0: x=1
        else: x=0
        return x + sum([b(n - i*j, i + 1)*(j + 1) for j in range(n//i + 1)])
    def a(n): return 1 if n==0 else b(n, 1) # Indranil Ghosh, Jun 09 2017, after Maple code by Alois P. Heinz
    

Formula

a(n) = Sum_{k=1..n} f(k, n-k), where f(n, k) (= A054250) = 1 if k = 0; Sum_{j=1..min(n, k)} (n-j+1)*f(j, k-j) if k > 0. - David W. Wilson, May 05 2000
a(n) = Sum_{k} A059623(n, k) for n > 0. - Henry Bottomley, Feb 01 2001
A006330(n) + a(n) = A000712(n). - Michael Somos, Jul 22 2003
G.f.: 1 + (Sum_{k>0} -(-1)^k x^(k(k+1)/2))/(Product_{k>0} (1-x^k))^2. - Michael Somos, Jul 22 2003
G.f.: 1 + Sum_{n>=1} (x^n / ( ( Product_{k=1..n-1} (1 - x^k)^2 ) * (1-x^n) ) ). - Joerg Arndt, Oct 01 2012
a(n) ~ exp(2*Pi*sqrt(n/3)) / (8 * 3^(3/4) * n^(5/4)) [Auluck, 1951]. - Vaclav Kotesovec, Jun 22 2015
a(n) + A115981(n) = 2^(n - 1). - Gus Wiseman, Mar 04 2020

Extensions

More terms from David W. Wilson, May 05 2000
Definition corrected by Wolfdieter Lang, Dec 05 2018

A332280 Number of integer partitions of n with unimodal run-lengths.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 41, 55, 75, 97, 129, 166, 215, 273, 352, 439, 557, 692, 865, 1066, 1325, 1614, 1986, 2413, 2940, 3546, 4302, 5152, 6207, 7409, 8862, 10523, 12545, 14814, 17562, 20690, 24397, 28615, 33645, 39297, 46009, 53609, 62504, 72581, 84412
Offset: 0

Views

Author

Gus Wiseman, Feb 18 2020

Keywords

Comments

First differs from A000041 at a(10) = 41, A000041(10) = 42.
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) = 41 partitions (A = 10) are:
  (A)     (61111)   (4321)     (3211111)
  (91)    (55)      (43111)    (31111111)
  (82)    (541)     (4222)     (22222)
  (811)   (532)     (42211)    (222211)
  (73)    (5311)    (421111)   (2221111)
  (721)   (5221)    (4111111)  (22111111)
  (7111)  (52111)   (3331)     (211111111)
  (64)    (511111)  (3322)     (1111111111)
  (631)   (442)     (331111)
  (622)   (4411)    (32221)
  (6211)  (433)     (322111)
Missing from this list is only (33211).
		

Crossrefs

The complement is counted by A332281.
Heinz numbers of these partitions are the complement of A332282.
Taking 0-appended first-differences instead of run-lengths gives A332283.
The normal case is A332577.
The opposite version is A332638.
Unimodal compositions are A001523.
Unimodal normal sequences are A007052.
Numbers whose unsorted prime signature is unimodal are A332288.

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-> 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_] := b[n, n, 0, True];
    a /@ Range[0, 65] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

A332283 Number of integer partitions of n whose first differences (assuming the last part is zero) are unimodal.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 13, 18, 24, 30, 38, 49, 59, 73, 90, 108, 129, 159, 184, 216, 258, 298, 347, 410, 466, 538, 626, 707, 807, 931, 1043, 1181, 1351, 1506, 1691, 1924, 2132, 2382, 2688, 2971, 3300, 3704, 4073, 4500, 5021, 5510, 6065, 6740, 7362, 8078
Offset: 0

Views

Author

Gus Wiseman, Feb 19 2020

Keywords

Comments

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

Examples

			The a(1) = 1 through a(7) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (42)      (52)
                    (211)   (221)    (51)      (61)
                    (1111)  (311)    (222)     (322)
                            (2111)   (321)     (421)
                            (11111)  (411)     (511)
                                     (3111)    (2221)
                                     (21111)   (3211)
                                     (111111)  (4111)
                                               (31111)
                                               (211111)
                                               (1111111)
		

Crossrefs

Unimodal compositions are A001523.
Unimodal normal sequences appear to be A007052.
Partitions with unimodal run-lengths are A332280.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.
The complement is counted by A332284.
The strict case is A332285.
Heinz numbers of partitions not in this class are A332287.

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

A332284 Number of integer partitions of n whose first differences (assuming the last part is zero) are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 12, 18, 28, 42, 62, 86, 123, 168, 226, 306, 411, 534, 704, 908, 1165, 1492, 1898, 2384, 3011, 3758, 4673, 5799, 7168, 8792, 10804, 13192, 16053, 19505, 23633, 28497, 34367, 41283, 49470, 59188, 70675, 84113, 100048, 118689, 140533
Offset: 0

Views

Author

Gus Wiseman, Feb 20 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(6) = 1 through a(11) = 18 partitions:
  (2211)  (331)    (431)     (441)      (541)       (551)
          (22111)  (3311)    (4311)     (3322)      (641)
                   (22211)   (32211)    (3331)      (4331)
                   (221111)  (33111)    (4411)      (4421)
                             (222111)   (33211)     (5411)
                             (2211111)  (42211)     (33221)
                                        (43111)     (33311)
                                        (222211)    (44111)
                                        (322111)    (52211)
                                        (331111)    (322211)
                                        (2221111)   (332111)
                                        (22111111)  (422111)
                                                    (431111)
                                                    (2222111)
                                                    (3221111)
                                                    (3311111)
                                                    (22211111)
                                                    (221111111)
		

Crossrefs

The complement is counted by A332283.
The strict version is A332286.
The Heinz numbers of these partitions are A332287.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences appear to be A328509.
Partitions with non-unimodal run-lengths are A332281.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.

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

A332287 Heinz numbers of integer partitions whose first differences (assuming the last part is zero) are not unimodal.

Original entry on oeis.org

36, 50, 70, 72, 98, 100, 108, 140, 144, 154, 180, 182, 196, 200, 216, 225, 242, 250, 252, 280, 286, 288, 294, 300, 308, 324, 338, 350, 360, 363, 364, 374, 392, 396, 400, 418, 429, 432, 441, 442, 450, 462, 468, 484, 490, 494, 500, 504, 507, 540, 550, 560, 561
Offset: 1

Views

Author

Gus Wiseman, Feb 21 2020

Keywords

Comments

A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), which gives a bijective correspondence between positive integers and integer partitions.

Examples

			The sequence of terms together with their prime indices begins:
   36: {1,1,2,2}
   50: {1,3,3}
   70: {1,3,4}
   72: {1,1,1,2,2}
   98: {1,4,4}
  100: {1,1,3,3}
  108: {1,1,2,2,2}
  140: {1,1,3,4}
  144: {1,1,1,1,2,2}
  154: {1,4,5}
  180: {1,1,2,2,3}
  182: {1,4,6}
  196: {1,1,4,4}
  200: {1,1,1,3,3}
  216: {1,1,1,2,2,2}
  225: {2,2,3,3}
  242: {1,5,5}
  250: {1,3,3,3}
  252: {1,1,2,2,4}
  280: {1,1,1,3,4}
For example, the prime indices of 70 with 0 appended are (4,3,1,0), with differences (-1,-2,-1), which is not unimodal, so 70 belongs to the sequence.
		

Crossrefs

The enumeration of these partitions by sum is A332284.
Not assuming the last part is zero gives A332725.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Partitions with non-unimodal run-lengths are A332281.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    Select[Range[1000],!unimodQ[Differences[Append[Reverse[primeMS[#]],0]]]&]

A332286 Number of strict integer partitions of n whose first differences (assuming the last part is zero) are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 3, 5, 5, 7, 9, 12, 15, 22, 23, 31, 40, 47, 58, 72, 81, 100, 122, 144, 171, 206, 236, 280, 333, 381, 445, 522, 593, 694, 802, 914, 1054, 1214, 1376, 1577, 1803, 2040, 2324, 2646, 2973, 3373, 3817, 4287, 4838, 5453, 6096, 6857
Offset: 0

Views

Author

Gus Wiseman, Feb 21 2020

Keywords

Comments

A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
Also the number integer partitions of n that cover an initial interval of positive integers and whose negated run-lengths are not unimodal.

Examples

			The a(8) = 1 through a(18) = 7 partitions:
  (431)  .  (541)  (641)  (651)   (652)   (752)   (762)   (862)
                          (5421)  (751)   (761)   (861)   (871)
                                  (5431)  (851)   (6531)  (961)
                                          (6431)  (7431)  (6532)
                                          (6521)  (7521)  (6541)
                                                          (7621)
                                                          (8431)
For example, (4,3,1,0) has first differences (-1,-2,-1), which is not unimodal, so (4,3,1) is counted under a(8).
		

Crossrefs

Strict partitions are A000009.
Partitions covering an initial interval are (also) A000009.
The non-strict version is A332284.
The complement is counted by A332285.
Unimodal compositions are A001523.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Partitions with non-unimodal run-lengths are A332281.
Normal partitions whose run-lengths are not unimodal are A332579.

Programs

  • Mathematica
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    Table[Length[Select[IntegerPartitions[n],And[UnsameQ@@#,!unimodQ[Differences[Append[#,0]]]]&]],{n,0,30}]

A332728 Number of integer partitions of n whose negated first differences (assuming the last part is zero) are unimodal.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 10, 13, 14, 17, 22, 24, 28, 34, 37, 43, 53, 56, 64, 76, 83, 93, 111, 117, 131, 153, 163, 182, 210, 225, 250, 284, 304, 332, 377, 401, 441, 497, 529, 576, 647, 687, 745, 830, 883, 955, 1062, 1127, 1216, 1339, 1422, 1532, 1684, 1779, 1914
Offset: 0

Views

Author

Gus Wiseman, Feb 26 2020

Keywords

Comments

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

Examples

			The a(1) = 1 through a(8) = 10 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (11111)  (222)     (331)      (71)
                                     (321)     (421)      (332)
                                     (111111)  (2221)     (431)
                                               (1111111)  (521)
                                                          (2222)
                                                          (11111111)
		

Crossrefs

The non-negated version is A332283.
The non-negated complement is counted by A332284.
The strict case is A332577.
The case of run-lengths (instead of differences) is A332638.
The complement is counted by A332744.
The Heinz numbers of partitions not in this class are A332287.
Unimodal compositions are A001523.
Compositions whose negation is unimodal are A332578.
Compositions whose run-lengths are unimodal are A332726.

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

A332744 Number of integer partitions of n whose negated first differences (assuming the last part is zero) are not unimodal.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 4, 7, 12, 17, 28, 39, 55, 77, 107, 142, 194, 254, 332, 434, 563, 716, 919, 1162, 1464, 1841, 2305, 2857, 3555, 4383, 5394, 6617, 8099, 9859, 12006, 14551, 17600, 21236, 25574, 30688, 36809, 44007, 52527, 62574, 74430, 88304, 104675, 123799
Offset: 0

Views

Author

Gus Wiseman, Feb 27 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(4) = 1 through a(9) = 17 partitions:
  (211)  (311)   (411)    (322)     (422)      (522)
         (2111)  (2211)   (511)     (611)      (711)
                 (3111)   (3211)    (3221)     (3222)
                 (21111)  (4111)    (3311)     (4221)
                          (22111)   (4211)     (4311)
                          (31111)   (5111)     (5211)
                          (211111)  (22211)    (6111)
                                    (32111)    (32211)
                                    (41111)    (33111)
                                    (221111)   (42111)
                                    (311111)   (51111)
                                    (2111111)  (222111)
                                               (321111)
                                               (411111)
                                               (2211111)
                                               (3111111)
                                               (21111111)
For example, the partition y = (4,2,1,1,1) has negated 0-appended first differences (2,1,0,0,1), which is not unimodal, so y is counted under a(9).
		

Crossrefs

The complement is counted by A332728.
The non-negated version is A332284.
The strict case is A332579.
The case of run-lengths (instead of differences) is A332639.
The Heinz numbers of these partitions are A332832.
Unimodal compositions are A001523.
Non-unimodal compositions are A115981.
Heinz numbers of partitions with non-unimodal run-lengths are A332282.
Partitions whose 0-appended first differences are unimodal are A332283.
Compositions whose negation is unimodal are A332578.
Numbers whose negated prime signature is not unimodal are A332642.
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[-Differences[Append[#,0]]]&]],{n,0,30}]

A072707 Number of non-unimodal compositions of n into distinct terms.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 24, 26, 46, 64, 100, 224, 276, 416, 590, 850, 1144, 2214, 2644, 3938, 5282, 7504, 9776, 13704, 21984, 27632, 38426, 51562, 69844, 91950, 123504, 159658, 246830, 303400, 416068, 540480, 730268, 933176, 1248110
Offset: 0

Views

Author

Henry Bottomley, Jul 04 2002

Keywords

Comments

Also the number of compositions of n into distinct terms whose negation is not unimodal. - Gus Wiseman, Mar 05 2020

Examples

			a(6)=2 since 6 can be written as 2+1+3 or 3+1+2.
From _Gus Wiseman_, Mar 05 2020: (Start)
The a(6) = 2 through a(9) = 6 strict compositions:
  (2,1,3)  (2,1,4)  (2,1,5)  (2,1,6)
  (3,1,2)  (4,1,2)  (3,1,4)  (3,1,5)
                    (4,1,3)  (3,2,4)
                    (5,1,2)  (4,2,3)
                             (5,1,3)
                             (6,1,2)
(End)
		

Crossrefs

The complement is counted by A072706.
The non-strict version is A115981.
The case where the negation is not unimodal either is A332874.
Unimodal compositions are A001523.
Strict compositions are A032020.
Non-unimodal permutations are A059204.
A triangle for strict unimodal compositions is A072705.
Non-unimodal sequences covering an initial interval are A328509.
Numbers whose prime signature is not unimodal are A332282.
Strict partitions whose 0-appended differences are not unimodal are A332286.
Compositions whose negation is unimodal are A332578.
Compositions whose negation is not unimodal are A332669.
Non-unimodal compositions covering an initial interval are A332743.

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[#]&]],{n,0,16}] (* Gus Wiseman, Mar 05 2020 *)

Formula

a(n) = A032020(n) - A072706(n) = Sum_{k} A059204(k) * A060016(n, k).

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