login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328509 Number of non-unimodal sequences of length n covering an initial interval of positive integers. 46
0, 0, 0, 3, 41, 425, 4287, 45941, 541219, 7071501, 102193755, 1622448861, 28090940363, 526856206877, 10641335658891, 230283166014653, 5315654596751659, 130370766738143517, 3385534662263335179, 92801587315936355325, 2677687796232803000171, 81124824998464533181661 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence.
LINKS
Eric Weisstein's World of Mathematics, Unimodal Sequence.
FORMULA
a(n) = A000670(n) - A007052(n-1) for n > 0. - Andrew Howroyd, Jan 28 2024
EXAMPLE
The a(3) = 3 sequences are (2,1,2), (2,1,3), (3,1,2).
The a(4) = 41 sequences:
(1212) (2113) (2134) (2413) (3142) (3412)
(1213) (2121) (2143) (3112) (3212) (4123)
(1312) (2122) (2212) (3121) (3213) (4132)
(1323) (2123) (2213) (3122) (3214) (4213)
(1324) (2131) (2312) (3123) (3231) (4231)
(1423) (2132) (2313) (3124) (3241) (4312)
(2112) (2133) (2314) (3132) (3312)
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[#]&]], {n, 0, 5}]
PROG
(PARI) seq(n)=Vec( serlaplace(1/(2-exp(x + O(x*x^n)))) - (1 - 3*x + x^2)/(1 - 4*x + 2*x^2), -(n+1)) \\ Andrew Howroyd, Jan 28 2024
CROSSREFS
Not requiring non-unimodality gives A000670.
The complement is counted by A007052.
The case where the negation is not unimodal either is A332873.
Unimodal compositions are A001523.
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.
Covering partitions with unimodal run-lengths are A332577.
Non-unimodal compositions covering an initial interval are A332743.
Sequence in context: A322244 A181226 A159249 * A087544 A305667 A213378
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 19 2020
EXTENSIONS
a(9) from Robert Price, Jun 19 2021
a(10) onwards from Andrew Howroyd, Jan 28 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 03:50 EDT 2024. Contains 372317 sequences. (Running on oeis4.)