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.

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

This page as a plain text file.
%I A332281 #16 Feb 16 2025 08:33:59
%S A332281 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,
%T A332281 450,597,778,1019,1302,1690,2142,2734,3448,4360,5432,6823,8453,10495,
%U A332281 12941,15968,19529,23964,29166,35525,43054,52173,62861,75842,91013,109208
%N A332281 Number of integer partitions of n whose run-lengths are not unimodal.
%C A332281 A sequence of positive integers is unimodal if it is the concatenation of a weakly increasing followed by a weakly decreasing sequence.
%H A332281 Alois P. Heinz, <a href="/A332281/b332281.txt">Table of n, a(n) for n = 0..1000</a>
%H A332281 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnimodalSequence.html">Unimodal Sequence</a>
%e A332281 The a(10) = 1 through a(15) = 10 partitions:
%e A332281   (33211)  (332111)  (44211)    (44311)     (55211)      (44322)
%e A332281                      (3321111)  (333211)    (433211)     (55311)
%e A332281                                 (442111)    (443111)     (443211)
%e A332281                                 (33211111)  (3332111)    (533211)
%e A332281                                             (4421111)    (552111)
%e A332281                                             (332111111)  (4332111)
%e A332281                                                          (4431111)
%e A332281                                                          (33321111)
%e A332281                                                          (44211111)
%e A332281                                                          (3321111111)
%p A332281 b:= proc(n, i, m, t) option remember; `if`(n=0, 1,
%p A332281      `if`(i<1, 0, add(b(n-i*j, i-1, j, t and j>=m),
%p A332281       j=1..min(`if`(t, [][], m), n/i))+b(n, i-1, m, t)))
%p A332281     end:
%p A332281 a:= n-> combinat[numbpart](n)-b(n$2, 0, true):
%p A332281 seq(a(n), n=0..65);  # _Alois P. Heinz_, Feb 20 2020
%t A332281 unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]]
%t A332281 Table[Length[Select[IntegerPartitions[n],!unimodQ[Length/@Split[#]]&]],{n,0,30}]
%t A332281 (* Second program: *)
%t A332281 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]]];
%t A332281 a[n_] := PartitionsP[n] - b[n, n, 0, True];
%t A332281 a /@ Range[0, 65] (* _Jean-François Alcover_, May 10 2021, after _Alois P. Heinz_ *)
%Y A332281 The complement is counted by A332280.
%Y A332281 The Heinz numbers of these partitions are A332282.
%Y A332281 The opposite version is A332639.
%Y A332281 Unimodal compositions are A001523.
%Y A332281 Non-unimodal permutations are A059204.
%Y A332281 Non-unimodal compositions are A115981.
%Y A332281 Non-unimodal normal sequences are A328509.
%Y A332281 Cf. A007052, A025065, A072706, A100883, A332283, A332284, A332286, A332287, A332579, A332638, A332640, A332641, A332642.
%K A332281 nonn
%O A332281 0,13
%A A332281 _Gus Wiseman_, Feb 19 2020