login
A332873
Number of non-unimodal, non-co-unimodal sequences of length n covering an initial interval of positive integers.
5
0, 0, 0, 0, 22, 340, 3954, 44716, 536858, 7056252, 102140970, 1622267196, 28090317226, 526854073564, 10641328363722, 230283141084220, 5315654511587498, 130370766447282204, 3385534661270087178, 92801587312544823804, 2677687796221222845802, 81124824998424994578652
OFFSET
0,5
COMMENTS
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. It is co-unimodal if its negative is unimodal.
LINKS
FORMULA
a(n) = A000670(n) + A000225(n) - 2*A007052(n-1) for n > 0. - Andrew Howroyd, Jan 28 2024
EXAMPLE
The a(4) = 22 sequences:
(1,2,1,2) (2,3,1,3)
(1,2,1,3) (2,3,1,4)
(1,3,1,2) (2,4,1,3)
(1,3,2,3) (3,1,2,1)
(1,3,2,4) (3,1,3,2)
(1,4,2,3) (3,1,4,2)
(2,1,2,1) (3,2,3,1)
(2,1,3,1) (3,2,4,1)
(2,1,3,2) (3,4,1,2)
(2,1,4,3) (4,1,3,2)
(2,3,1,2) (4,2,3,1)
MATHEMATICA
allnorm[n_]:=If[n<=0, {{}}, Function[s, Array[Count[s, y_/; y<=#]+1&, n]]/@Subsets[Range[n-1]+1]];
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]];
Table[Length[Select[Union@@Permutations/@allnorm[n], !unimodQ[#]&&!unimodQ[-#]&]], {n, 0, 5}]
PROG
(PARI) seq(n)=Vec( serlaplace(1/(2-exp(x + O(x*x^n)))) - (1 - 6*x + 12*x^2 - 6*x^3)/((1 - x)*(1 - 2*x)*(1 - 4*x + 2*x^2)), -(n+1)) \\ Andrew Howroyd, Jan 28 2024
CROSSREFS
Not requiring non-co-unimodality gives A328509.
Not requiring non-unimodality also gives A328509.
The version for run-lengths of partitions is A332640.
The version for unsorted prime signature is A332643.
The version for compositions is A332870.
Unimodal compositions are A001523.
Unimodal sequences covering an initial interval are A007052.
Non-unimodal permutations are A059204.
Non-unimodal compositions are A115981.
Unimodal compositions covering an initial interval are A227038.
Numbers whose unsorted prime signature is not unimodal are A332282.
Numbers whose negated prime signature is not unimodal are A332642.
Compositions whose run-lengths are not unimodal are A332727.
Non-unimodal compositions covering an initial interval are A332743.
Sequence in context: A021274 A021534 A018070 * A019490 A021254 A231647
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 03 2020
EXTENSIONS
a(9) onwards from Andrew Howroyd, Jan 28 2024
STATUS
approved