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!)
A072704 Triangle of number of weakly unimodal partitions/compositions of n into exactly k terms. 23

%I #28 Jan 07 2024 10:53:39

%S 1,1,1,1,2,1,1,3,3,1,1,4,5,4,1,1,5,8,7,5,1,1,6,12,12,9,6,1,1,7,16,20,

%T 16,11,7,1,1,8,21,30,28,20,13,8,1,1,9,27,42,45,36,24,15,9,1,1,10,33,

%U 58,68,60,44,28,17,10,1,1,11,40,77,98,95,75,52,32,19,11,1

%N Triangle of number of weakly unimodal partitions/compositions of n into exactly k terms.

%H Alois P. Heinz, <a href="/A072704/b072704.txt">Rows n = 1..141, flattened</a>

%H Henry Bottomley, <a href="/A001523/a001523.gif">Illustration of initial terms</a>

%H Rigoberto Flórez, Leandro Junes, and José L. Ramírez, <a href="https://doi.org/10.1016/j.disc.2019.06.018">Enumerating several aspects of non-decreasing Dyck paths</a>, Discrete Mathematics (2019) Vol. 342, Issue 11, 3079-3097. See page 3094, Table 4.

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

%F G.f. with initial column 1, 0, 0, ...: 1 + Sum_{n>=1} (t*x^n / ( ( Product_{k=1..n-1} (1 - t*x^k)^2 ) * (1 - t*x^n) ) ). - _Joerg Arndt_, Oct 01 2017

%e Rows start:

%e 01: [1]

%e 02: [1, 1]

%e 03: [1, 2, 1]

%e 04: [1, 3, 3, 1]

%e 05: [1, 4, 5, 4, 1]

%e 06: [1, 5, 8, 7, 5, 1]

%e 07: [1, 6, 12, 12, 9, 6, 1]

%e 08: [1, 7, 16, 20, 16, 11, 7, 1]

%e 09: [1, 8, 21, 30, 28, 20, 13, 8, 1]

%e 10: [1, 9, 27, 42, 45, 36, 24, 15, 9, 1]

%e ...

%e T(6,3)=8 since 6 can be written as 1+1+4, 1+2+3, 1+3+2, 1+4+1, 2+2+2, 2+3+1, 3+2+1, or 4+1+1 but not 2+1+3 or 3+1+2.

%p b:= proc(n, i) option remember; local q; `if`(i>n, 0,

%p `if`(irem(n, i, 'q')=0, x^q, 0) +expand(

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

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 1)):

%p seq(T(n), n=1..12); # _Alois P. Heinz_, Mar 26 2014

%t b[n_, i_] := b[n, i] = If[i>n, 0, If[Mod[n, i ] == 0, x^Quotient[n, i], 0] + Expand[ Sum[b[n-i*j, i+1]*(j+1)*x^j, {j, 0, n/i}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, 1]]; Table[T[n], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Feb 26 2015, after _Alois P. Heinz_ *)

%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,{k}],unimodQ]],{n,0,10},{k,0,n}] (* _Gus Wiseman_, Mar 06 2020 *)

%o (PARI) \\ starting for n=0, with initial column 1, 0, 0, ...:

%o N=25; x='x+O('x^N);

%o T=Vec(1 + sum(n=1, N, t*x^n / ( prod(k=1,n-1, (1 - t*x^k)^2 ) * (1 - t*x^n) ) ) )

%o for(r=1,#T, print(Vecrev(T[r])) ); \\ _Joerg Arndt_, Oct 01 2017

%Y Cf. A059623, A072705. Row sums are A001523. First column is A057427, second is A000027 offset, third appears to be A000212 offset, right hand columns include A000012, A000027, A005408 and A008574.

%Y The case of partitions is A072233.

%Y Dominates A332670 (the version for negated compositions).

%Y The strict case is A072705.

%Y The case of constant compositions is A113704.

%Y Unimodal sequences covering an initial interval are A007052.

%Y Partitions whose run-lengths are unimodal are A332280.

%Y Cf. A107429, A115981, A227038, A328509, A332282, A332283, A332578, A332638, A332669, A332728.

%K nonn,tabl

%O 1,5

%A _Henry Bottomley_, Jul 04 2002

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)