The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A333149 Number of strict compositions of n that are neither increasing nor decreasing. 7
0, 0, 0, 0, 0, 0, 4, 4, 8, 12, 38, 42, 72, 98, 150, 298, 372, 542, 760, 1070, 1428, 2600, 3120, 4550, 6050, 8478, 10976, 15220, 23872, 29950, 41276, 55062, 74096, 97148, 129786, 167256, 256070, 314454, 429338, 556364, 749266, 955746, 1275016, 1618054 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
A composition of n is a finite sequence of positive integers summing to n. It is strict if there are no repeated parts.
LINKS
Eric Weisstein's World of Mathematics, Unimodal Sequence
FORMULA
a(n) = A032020(n) - 2*A000009(n) + 1.
EXAMPLE
The a(6) = 4 through a(9) = 12 compositions:
(1,3,2) (1,4,2) (1,4,3) (1,5,3)
(2,1,3) (2,1,4) (1,5,2) (1,6,2)
(2,3,1) (2,4,1) (2,1,5) (2,1,6)
(3,1,2) (4,1,2) (2,5,1) (2,4,3)
(3,1,4) (2,6,1)
(3,4,1) (3,1,5)
(4,1,3) (3,2,4)
(5,1,2) (3,4,2)
(3,5,1)
(4,2,3)
(5,1,3)
(6,1,2)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], UnsameQ@@#&&!Greater@@#&&!Less@@#&]], {n, 0, 10}]
CROSSREFS
The non-strict case is A332834.
The complement is counted by A333147.
Strict partitions are A000009.
Strict compositions are A032020.
Non-unimodal strict compositions are A072707.
Strict partitions with increasing or decreasing run-lengths are A333190.
Strict compositions with increasing or decreasing run-lengths are A333191.
Unimodal compositions are A001523, with strict case A072706.
Sequence in context: A002368 A299474 A022087 * A095294 A190100 A244421
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 16 2020
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 15 14:34 EDT 2024. Contains 372540 sequences. (Running on oeis4.)