OFFSET
0,3
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.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..3000 (terms 0..1000 from Andrew Howroyd)
FORMULA
a(n) + A332669(n) = 2^(n - 1).
G.f.: 1 + Sum_{j>0} x^j/((1 - x^j)*(Product_{k>j} 1 - x^k)^2). - Andrew Howroyd, Mar 01 2020
a(n) ~ Pi * exp(2*Pi*sqrt(n/3)) / (4 * 3^(5/4) * n^(7/4)). - Vaclav Kotesovec, Mar 01 2020
EXAMPLE
The a(1) = 1 through a(5) = 13 compositions:
(1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(112) (41)
(211) (113)
(1111) (122)
(212)
(221)
(311)
(1112)
(2111)
(11111)
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[-#]&]], {n, 0, 10}]
nmax = 50; CoefficientList[Series[1 + Sum[x^j*(1 - x^j)/Product[1 - x^k, {k, j, nmax - j}]^2, {j, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Mar 01 2020 *)
PROG
(PARI) seq(n)={Vec(1 + sum(j=1, n, x^j/((1-x^j)*prod(k=j+1, n-j, 1 - x^k + O(x*x^(n-j)))^2)))} \\ Andrew Howroyd, Mar 01 2020
CROSSREFS
Dominated by A001523 (unimodal compositions).
The strict case is A072706.
The case that is unimodal also is A329398.
The complement is counted by A332669.
Row sums of A332670.
Unimodal normal sequences appear to be A007052.
Non-unimodal compositions are A115981.
Non-unimodal normal sequences are A328509.
Partitions whose run-lengths are unimodal are A332280.
Partitions whose negated run-lengths are unimodal are A332638.
Numbers whose unsorted prime signature is not unimodal are A332642.
Partitions whose negated 0-appended differences are unimodal are A332728.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 28 2020
EXTENSIONS
Terms a(26) and beyond from Andrew Howroyd, Mar 01 2020
STATUS
approved