login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227038 Number of (weakly) unimodal compositions of n where all parts 1, 2, ..., m appear where m is the largest part. 38

%I

%S 1,1,1,3,4,7,13,19,30,44,71,98,147,205,294,412,575,783,1077,1456,1957,

%T 2634,3492,4627,6082,7980,10374,13498,17430,22451,28767,36806,46803,

%U 59467,75172,94839,119285,149599,187031,233355,290340,360327,446222,551251,679524,835964,1026210

%N Number of (weakly) unimodal compositions of n where all parts 1, 2, ..., m appear where m is the largest part.

%H Joerg Arndt and Alois P. Heinz, <a href="/A227038/b227038.txt">Table of n, a(n) for n = 0..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Composition_(combinatorics)">Composition (combinatorics)</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/UnimodalSequence.html">Unimodal Sequence</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Unimodality">Unimodality</a>

%F a(n) ~ c * exp(Pi*sqrt(r*n)) / n, where r = 0.9409240878664458093345791978063..., c = 0.05518035191234679423222212249... - _Vaclav Kotesovec_, Mar 04 2020

%F a(n) + A332743(n) = 2^(n - 1). - _Gus Wiseman_, Mar 05 2020

%e There are a(8) = 30 such compositions of 8:

%e 01: [ 1 1 1 1 1 1 1 1 ]

%e 02: [ 1 1 1 1 1 1 2 ]

%e 03: [ 1 1 1 1 1 2 1 ]

%e 04: [ 1 1 1 1 2 1 1 ]

%e 05: [ 1 1 1 1 2 2 ]

%e 06: [ 1 1 1 2 1 1 1 ]

%e 07: [ 1 1 1 2 2 1 ]

%e 08: [ 1 1 1 2 3 ]

%e 09: [ 1 1 1 3 2 ]

%e 10: [ 1 1 2 1 1 1 1 ]

%e 11: [ 1 1 2 2 1 1 ]

%e 12: [ 1 1 2 2 2 ]

%e 13: [ 1 1 2 3 1 ]

%e 14: [ 1 1 3 2 1 ]

%e 15: [ 1 2 1 1 1 1 1 ]

%e 16: [ 1 2 2 1 1 1 ]

%e 17: [ 1 2 2 2 1 ]

%e 18: [ 1 2 2 3 ]

%e 19: [ 1 2 3 1 1 ]

%e 20: [ 1 2 3 2 ]

%e 21: [ 1 3 2 1 1 ]

%e 22: [ 1 3 2 2 ]

%e 23: [ 2 1 1 1 1 1 1 ]

%e 24: [ 2 2 1 1 1 1 ]

%e 25: [ 2 2 2 1 1 ]

%e 26: [ 2 2 3 1 ]

%e 27: [ 2 3 1 1 1 ]

%e 28: [ 2 3 2 1 ]

%e 29: [ 3 2 1 1 1 ]

%e 30: [ 3 2 2 1 ]

%e From _Gus Wiseman_, Mar 05 2020: (Start)

%e The a(1) = 1 through a(6) = 13 compositions:

%e (1) (11) (12) (112) (122) (123)

%e (21) (121) (221) (132)

%e (111) (211) (1112) (231)

%e (1111) (1121) (321)

%e (1211) (1122)

%e (2111) (1221)

%e (11111) (2211)

%e (11112)

%e (11121)

%e (11211)

%e (12111)

%e (21111)

%e (111111)

%e (End)

%p b:= proc(n,i) option remember;

%p `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+

%p add(b(n-i*j, i+1)*(j+1), j=1..n/i))

%p end:

%p a:= n-> `if`(n=0, 1, b(n, 1)):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Mar 26 2014

%t b[n_, i_] := b[n, i] = If[i>n, 0, If[Mod[n, i] == 0, 1, 0] + Sum[b[n-i*j, i+1]*(j+1), {j, 1, n/i}]]; a[n_] := If[n==0, 1, b[n, 1]]; Table[a[n], {n, 0, 60}] (* _Jean-Fran├žois Alcover_, Apr 09 2015, after _Alois P. Heinz_ *)

%t normQ[m_]:=m=={}||Union[m]==Range[Max[m]];

%t unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&unimodQ[#]&]],{n,0,10}] (* _Gus Wiseman_, Mar 05 2020 *)

%Y Cf. A001523 (unimodal compositions), A001522 (smooth unimodal compositions with first and last part 1), A001524 (unimodal compositions such that each up-step is by at most 1 and first part is 1).

%Y Organizing by length rather than sum gives A007052.

%Y The complement is counted by A332743.

%Y The case of run-lengths of partitions is A332577, with complement A332579.

%Y Compositions covering an initial interval are A107429.

%Y Non-unimodal compositions are A115981.

%Y Cf. A000009, A055932, A072704, A317086, A329766, A332578, A332669, A332670.

%K nonn

%O 0,4

%A _Joerg Arndt_, Jun 28 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 18:53 EDT 2021. Contains 343050 sequences. (Running on oeis4.)