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.

A332051 Number of compositions of 2n where the multiplicity of the first part equals n.

Original entry on oeis.org

1, 1, 3, 4, 15, 36, 126, 372, 1239, 3910, 12848, 41581, 136578, 447188, 1473342, 4855704, 16053831, 53138244, 176233968, 585202262, 1945964080, 6478043121, 21588979877, 72016891509, 240452892570, 803489258286, 2686964354376, 8991840800137, 30110638705890
Offset: 0

Views

Author

Alois P. Heinz, Feb 06 2020

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: 2.
a(2) = 3: 22, 112, 121.
a(3) = 4: 222, 1113, 1131, 1311.
a(4) = 15: 2222, 11114, 11141, 11411, 14111, 111122, 111212, 111221, 112112, 112121, 112211, 121112, 121121, 121211, 122111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, x, add(expand(
         `if`(i=j, x, 1)*b(n-j, `if`(n `if`(n=0, 1, coeff(add(b(2*n-j, j), j=1..2*n), x, n)):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, x, Sum[Expand[If[i == j, x, 1] b[n - j, If[n < i + j, 0, i]]], {j, 1, n}]];
    a[n_] := If[n == 0, 1, Coefficient[Sum[b[2 n - j, j], {j, 1, 2 n}], x, n]];
    a /@ Range[0, 35] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)

Formula

a(n) = A331332(2n,n).
a(n) ~ c * d^n / sqrt(Pi*n), where d = 3.40869819984215108586487649733361214893... is the root of the equation 4 - 32*d - 8*d^2 + 5*d^3 = 0, and c = 0.34930509632919368540449993196290415079... is the root of the equation 5 - 4*c^2 - 592*c^4 + 2368*c^6 = 0. - Vaclav Kotesovec, Feb 08 2020
Recurrence: 5*(n-1)*n*(2294*n^5 - 31267*n^4 + 168064*n^3 - 445121*n^2 + 580494*n - 297864)*a(n) = (n-1)*(29822*n^6 - 415647*n^5 + 2327634*n^4 - 6668807*n^3 + 10238782*n^2 - 7910608*n + 2368800)*a(n-1) + 2*(27528*n^7 - 434848*n^6 + 2851985*n^5 - 10024036*n^4 + 20278349*n^3 - 23438626*n^2 + 14189888*n - 3420000)*a(n-2) - 2*(41292*n^7 - 647684*n^6 + 4218357*n^5 - 14743832*n^4 + 29759871*n^3 - 34533464*n^2 + 21199620*n - 5259600)*a(n-3) + 2*(n-4)*(2*n - 7)*(2294*n^5 - 19797*n^4 + 65936*n^3 - 105591*n^2 + 80846*n - 23400)*a(n-4). - Vaclav Kotesovec, Feb 08 2020