cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A098133 Number of compositions of n in which the smallest part is equal to the number of parts.

Original entry on oeis.org

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

Views

Author

Vladeta Jovovic, Sep 27 2004

Keywords

Examples

			a(9)=3 because we have [2,7], [7,2] and [3,3,3].
		

Crossrefs

Cf. A006141.

Programs

  • 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 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 *)

Formula

G.f.: Sum_{m>=1} (x^(m^2) - x^(m*(m+1)))/(1-x)^m.

Extensions

More terms from Emeric Deutsch, Apr 18 2005