|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
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)):
|
|
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
|
Unimodal sequences covering an initial interval are A007052.
Non-unimodal strict compositions are A072707.
Unimodal compositions covering an initial interval are A227038.
Numbers whose prime signature is not unimodal are A332282.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|