login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A072705
Triangle of number of unimodal compositions of n into exactly k distinct terms.
7
1, 1, 0, 1, 2, 0, 1, 2, 0, 0, 1, 4, 0, 0, 0, 1, 4, 4, 0, 0, 0, 1, 6, 4, 0, 0, 0, 0, 1, 6, 8, 0, 0, 0, 0, 0, 1, 8, 12, 0, 0, 0, 0, 0, 0, 1, 8, 16, 8, 0, 0, 0, 0, 0, 0, 1, 10, 20, 8, 0, 0, 0, 0, 0, 0, 0, 1, 10, 28, 16, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 32, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 40, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,5
COMMENTS
Also the number of compositions of n into exactly k distinct terms whose negation is unimodal. - Gus Wiseman, Mar 06 2020
LINKS
FORMULA
T(n,k) = 2^(k-1)*A060016(n,k) = T(n-k,k)+2*T(n-k,k-1) [starting with T(0,0)=0, T(0,1)=0 and T(n,1)=1 for n>0].
EXAMPLE
Rows start: 1; 1,0; 1,2,0; 1,2,0,0; 1,4,0,0,0; 1,4,4,0,0,0; 1,6,4,0,0,0,0; 1,6,8,0,0,0,0,0; etc. T(6,3)=4 since 6 can be written as 1+2+3, 1+3+2, 2+3+1, or 3+2+1 but not 2+1+3 or 3+1+2.
From Gus Wiseman, Mar 06 2020: (Start)
Triangle begins:
1
1 0
1 2 0
1 2 0 0
1 4 0 0 0
1 4 4 0 0 0
1 6 4 0 0 0 0
1 6 8 0 0 0 0 0
1 8 12 0 0 0 0 0 0
1 8 16 8 0 0 0 0 0 0
1 10 20 8 0 0 0 0 0 0 0
1 10 28 16 0 0 0 0 0 0 0 0
1 12 32 24 0 0 0 0 0 0 0 0 0
1 12 40 40 0 0 0 0 0 0 0 0 0 0
1 14 48 48 16 0 0 0 0 0 0 0 0 0 0
(End)
MAPLE
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1,
expand(b(n, i-1) +`if`(i>n, 0, x*b(n-i, i-1)))))
end:
T:= n-> (p-> seq(coeff(p, x, i)*ceil(2^(i-1)), i=1..n))(b(n$2)):
seq(T(n), n=1..14); # Alois P. Heinz, Mar 26 2014
MATHEMATICA
b[n_, i_] := b[n, i] = If[n > i*(i+1)/2, 0, If[n == 0, 1, Expand[b[n, i-1] + If[i > n, 0, x*b[n-i, i-1]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i]* Ceiling[2^(i-1)], {i, 1, n}]][b[n, n]]; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)
unimodQ[q_]:=Or[Length[q]<=1, If[q[[1]]<=q[[2]], unimodQ[Rest[q]], OrderedQ[Reverse[q]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n, {k}], UnsameQ@@#&&unimodQ[#]&]], {n, 12}, {k, n}] (* Gus Wiseman, Mar 06 2020 *)
CROSSREFS
Cf. A060016, A072574, A072704. Row sums are A072706.
Column k = 2 is A052928.
Unimodal compositions are A001523.
Unimodal sequences covering an initial interval are A007052.
Strict compositions are A032020.
Non-unimodal strict compositions are A072707.
Unimodal compositions covering an initial interval are A227038.
Numbers whose prime signature is not unimodal are A332282.
Sequence in context: A334872 A263844 A079644 * A072574 A293595 A261249
KEYWORD
nonn,tabl,look
AUTHOR
Henry Bottomley, Jul 04 2002
STATUS
approved