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”).

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
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):
seq(a(n), n=1..52); # Alois P. Heinz, Oct 01 2021
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];
Table[a[n], {n, 1, 52}] (* Jean-François Alcover, Mar 13 2022, after Alois P. Heinz *)
CROSSREFS
Cf. A006141.
Sequence in context: A352828 A029100 A356758 * A138185 A225941 A138705
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Sep 27 2004
EXTENSIONS
More terms from Emeric Deutsch, Apr 18 2005
STATUS
approved