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.

Showing 1-3 of 3 results.

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

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

Original entry on oeis.org

0, 2, 9, 30, 80, 180, 357, 644, 1080, 1710, 2585, 3762, 5304, 7280, 9765, 12840, 16592, 21114, 26505, 32870, 40320, 48972, 58949, 70380, 83400, 98150, 114777, 133434, 154280, 177480, 203205, 231632, 262944, 297330, 334985, 376110, 420912, 469604, 522405, 579540, 641240, 707742, 779289, 856130
Offset: 1

Views

Author

Enrique Navarrete, Mar 14 2022

Keywords

Comments

a(n) is the number of ways to place n indistinguishable balls into n distinguishable boxes with either 1 or 2 boxes remaining empty.
a(n) is also the number of weak compositions of n into n parts that contain either one or two 0's.
a(n)+1 is the number of ways to place n indistinguishable balls into n distinguishable boxes with at most 2 boxes remaining empty (just add the case of no empty boxes in which we place exactly one ball in one box).

Examples

			a(4)=30 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); 2+1+1+0 (12 such compositions).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Binomial[n, 2] * (Binomial[n - 1, 2] + 2); Array[a, 50] (* Amiram Eldar, Mar 15 2022 *)

Formula

G.f.: x^2*(2 - x + 5*x^2)/(1 - x)^5. - Stefano Spezia, Mar 15 2022

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

Original entry on oeis.org

0, 9, 48, 200, 780, 2989, 11424, 43740, 167940, 646624, 2496120, 9657674, 37442132, 145422645, 565722688, 2203961396, 8597496564, 33578000572, 131282408360, 513791607378, 2012616400036, 7890371113904, 30957699535728
Offset: 3

Views

Author

Enrique Navarrete, Dec 27 2022

Keywords

Comments

a(n) is the number of ways to place n indistinguishable balls into n-1 distinguishable boxes with at least one box remaining empty and not all balls placed in one box.

Examples

			For n=4, the 9 distributions are:
  |ooo|o| |
  |ooo| |o|
  |o|ooo| |
  | |ooo|o|
  |o| |ooo|
  | |o|ooo|
  |oo|oo| |
  |oo| |oo|
  | |oo|oo|.
		

Crossrefs

Formula

a(n) = A001791(n-1) - 2*(n-1), n > 2.
G.f.: (x^4 - 2*x^3 - 2*x^2 + 2*x - 1)/(1 - x)^2 + 4*x^2/(sqrt(1 - 4*x)*(sqrt(1 - 4*x) - 1)^2). - Stefano Spezia, Dec 28 2022
D-finite with recurrence n*a(n) +7*(-n+1)*a(n-1) +2*(7*n-16)*a(n-2) +4*(-2*n+7)*a(n-3) +12*(n-5)=0. - R. J. Mathar, Jan 25 2023
Showing 1-3 of 3 results.