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-2 of 2 results.

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

A253192 Number of ways to place nonintersecting diagonals in convex (n+3)-gon so as to create exactly one triangle.

Original entry on oeis.org

1, 0, 5, 6, 35, 80, 309, 890, 3058, 9580, 31863, 103054, 340415, 1116032, 3688745, 12176814, 40344505, 133742500, 444262378, 1477142040, 4918099660, 16390294664, 54679621775, 182572812266, 610115196150, 2040383498748, 6828408179435, 22866979920390, 76623655367703, 256899191586880, 861774049296325
Offset: 0

Views

Author

Michael D. Weiner, Mar 24 2015

Keywords

Examples

			a(1)=0 since there are no dissections of a convex quadrilateral with exactly one triangle.
a(2)=5 because we can place one diagonal in a pentagon 5 different ways, each time creating one triangle and one quadrilateral.
		

Crossrefs

Cf. A255197.

Programs

  • Maple
    a:=n->sum(binomial(n+k+2, k)*binomial(n-k-1, k-1), k = 1 .. trunc((1/2)*n)): (1, seq(a(n), n=1..30));
    ogf := (RootOf((4*x^3-32*x^2-8*x+5)*_Z^3+(-9*x^4+42*x^3+249*x^2+96*x-51)*_Z+18*x^4-116*x^3-269*x^2-128*x+62)-2)/(3*x^2);
    gfun[seriestolist](series(ogf, x=0, 30))[]; # Mark van Hoeij, Nov 28 2024
  • Mathematica
    Prepend[Table[Sum[Binomial[n + k + 2, k]*Binomial[n - k - 1, k - 1], {k, 1, n/2}], {n, 1, 30}], 1] (* Michael De Vlieger, Mar 24 2015 *)

Formula

a(n) = Sum_{k=1..floor(n/2)} C(n+k+2,k)*C(n-k-1,k-1), n>0.
D-finite with recurrence: 0=2*(n-1)*(2*n-3)*(n+1)*(37*n^3 + 97*n^2 + 76*n + 20)*a(n-3) - 2*n*(592*n^5 + 960*n^4 - 15*n^3 - 70*n^2 + 263*n + 70)*a(n-2) - 2*n*(n-1)*(n+1)*(148*n^3 + 314*n^2 + 37*n - 89)*a(n-1) + 5*n*(n+2)*(n+1)*(37*n^3 - 14*n^2 - 7*n + 4)*a(n).
a(n) ~ sqrt(c) * d^n / sqrt(Pi*n), where d = 3.4086981998421510858648764973336... is the real root of the equation 4 - 32*d - 8*d^2 + 5*d^3 = 0 and c = 0.8203071528123829561131676776610304796... is the smallest positive real root of the equation 1 + 402019*c - 584933*c^2 + 115625*c^3 = 0. - Vaclav Kotesovec, Jul 05 2024
Showing 1-2 of 2 results.