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.

A352027 a(n) = binomial(2*n-1,n) - n*(n-1) - 1.

Original entry on oeis.org

0, 0, 3, 22, 105, 431, 1673, 6378, 24237, 92287, 352605, 1351945, 5200143, 20058117, 77558549, 300539954, 1166802837, 4537567343, 17672631557, 68923264029, 269128936799, 1052049481397, 4116715363293, 16123801840997, 63205303218275, 247959266473401, 973469712823353
Offset: 1

Views

Author

Enrique Navarrete, Feb 28 2022

Keywords

Comments

a(n) is the number of ways to place n indistinguishable balls into n distinguishable boxes with at least 2 boxes remaining empty.
a(n) is also the number of weak compositions of n into n parts in which at least two parts are zero.

Examples

			a(4)=22 since 4 can be written as 3+1+0+0, 0+3+0+1, etc. (12 such compositions); 2+2+0+0 (6 such compositions); 4+0+0+0 (4 such compositions).
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[2n-1,n]-n(n-1)-1,{n,40}] (* Harvey P. Dale, Dec 03 2022 *)
  • PARI
    a(n) = binomial(2*n-1,n) - n*(n-1) - 1; \\ Michel Marcus, Apr 12 2022

Formula

G.f.: 2*x/(4*x - 1 + sqrt(1 - 4*x)) - (1 - 2*x + 3*x^2)/(1 - x)^3. - Stefano Spezia, Mar 01 2022
D-finite with recurrence n*a(n) +2*(-3*n+2)*a(n-1) +(9*n-14)*a(n-2) +2*(-2*n+5)*a(n-3) +2*(-9*n+22)=0. - R. J. Mathar, Jan 25 2023