|
|
A098133
|
|
Number of compositions of n in which the smallest part is equal to the number of parts.
|
|
3
|
|
|
1, 0, 0, 1, 2, 2, 2, 2, 3, 5, 8, 11, 14, 17, 20, 24, 30, 39, 52, 69, 90, 115, 144, 177, 215, 260, 315, 384, 472, 584, 725, 900, 1114, 1372, 1679, 2041, 2466, 2965, 3553, 4250, 5082, 6081, 7285, 8738, 10490, 12597, 15121, 18130, 21699, 25912, 30865, 36670
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{m>=1} (x^(m^2) - x^(m*(m+1)))/(1-x)^m.
|
|
EXAMPLE
|
a(9)=3 because we have [2,7], [7,2] and [3,3,3].
|
|
MAPLE
|
G:=sum((x^(m^2)-x^(m*(m+1)))/(1-x)^m, m=1..35):Gser:=series(G, x=0, 60): seq(coeff(Gser, x^n), n=1..58); # Emeric Deutsch, Apr 18 2005
# second Maple program:
b:= proc(n, s, c) option remember; `if`(s<c, 0, `if`(n=0,
`if`(s=c, 1, 0), add(b(n-j, min(j, s), c+1), j=1..n)))
end:
a:= n-> b(n$2, 0):
|
|
MATHEMATICA
|
b[n_, s_, c_] := b[n, s, c] = If[s < c, 0, If[n == 0,
If[s == c, 1, 0], Sum[b[n - j, Min[j, s], c + 1], {j, 1, n}]]];
a[n_] := b[n, n, 0];
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|