|
|
A072704
|
|
Triangle of number of weakly unimodal partitions/compositions of n into exactly k terms.
|
|
23
|
|
|
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, 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, 58, 68, 60, 44, 28, 17, 10, 1, 1, 11, 40, 77, 98, 95, 75, 52, 32, 19, 11, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
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
|
|
EXAMPLE
|
Rows start:
01: [1]
02: [1, 1]
03: [1, 2, 1]
04: [1, 3, 3, 1]
05: [1, 4, 5, 4, 1]
06: [1, 5, 8, 7, 5, 1]
07: [1, 6, 12, 12, 9, 6, 1]
08: [1, 7, 16, 20, 16, 11, 7, 1]
09: [1, 8, 21, 30, 28, 20, 13, 8, 1]
10: [1, 9, 27, 42, 45, 36, 24, 15, 9, 1]
...
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.
|
|
MAPLE
|
b:= proc(n, i) option remember; local q; `if`(i>n, 0,
`if`(irem(n, i, 'q')=0, x^q, 0) +expand(
add(b(n-i*j, i+1)*(j+1)*x^j, j=0..n/i)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 1)):
|
|
MATHEMATICA
|
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 *)
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}], unimodQ]], {n, 0, 10}, {k, 0, n}] (* Gus Wiseman, Mar 06 2020 *)
|
|
PROG
|
(PARI) \\ starting for n=0, with initial column 1, 0, 0, ...:
N=25; x='x+O('x^N);
T=Vec(1 + sum(n=1, N, t*x^n / ( prod(k=1, n-1, (1 - t*x^k)^2 ) * (1 - t*x^n) ) ) )
for(r=1, #T, print(Vecrev(T[r])) ); \\ Joerg Arndt, Oct 01 2017
|
|
CROSSREFS
|
Dominates A332670 (the version for negated compositions).
The case of constant compositions is A113704.
Unimodal sequences covering an initial interval are A007052.
Partitions whose run-lengths are unimodal are A332280.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|