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-10 of 14 results. Next

A002740 Number of tree-rooted bridgeless planar maps with two vertices and n faces.

Original entry on oeis.org

0, 0, 0, 2, 15, 84, 420, 1980, 9009, 40040, 175032, 755820, 3233230, 13728792, 57946200, 243374040, 1017958725, 4242920400, 17631691440, 73078721100, 302202005490, 1247182879800, 5137916074200, 21132472200840, 86794082253450, 356013544661424, 1458583920435600, 5969389748449400
Offset: 0

Views

Author

Keywords

Comments

a(n) is the sum of the major indices of all Dyck words of length 2n-2. The major index of a Dyck word is the sum of the positions of those 1's that are followed by a 0. Example: a(4)=15 because the Dyck words of length 6 are 010101, 010011, 001101, 001011 and 000111 having major indices 6,2,4,3 and 0, respectively. a(n) = Sum_{k=0..n(n-1)} k*A129175(n,k). - Emeric Deutsch, Apr 20 2007

References

  • J. Ser, Les Calculs Formels des Séries de Factorielles, Gauthier-Villars, Paris, 1933, p. 97.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A129175.
A diagonal of A253180.

Programs

  • Magma
    [(n-2)*Binomial(2*n-2,n-2)/2 : n in [0..30]]; // Wesley Ivan Hurt, Sep 24 2014
  • Maple
    with(combinat):for n from 0 to 22 do printf(`%d, `,n*sum(binomial(2*n, n)/(n+1)/2, k=2..n)) od: # Zerinvary Lajos, Mar 13 2007
    a:=n->sum(sum(binomial(2*n,n)/(n+1)/2, j=1..n),k=2..n): seq(a(n), n=0..25); # Zerinvary Lajos, May 09 2007
    A002740:=n->(n-2)*binomial(2*n-2,n-2)/2+0^n: seq(A002740(n), n=0..30); # Wesley Ivan Hurt, Sep 24 2014
  • Mathematica
    a[n_] := (n-1)(n-2)Binomial[2(n-1), n-1]/(2n); a[0] = 0; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Nov 16 2011 *)
  • MuPAD
    combinat::catalan(n) *binomial(n,2) $ n = 0..22 // Zerinvary Lajos, Feb 15 2007
    
  • PARI
    a(n)=if(n<3,0,(2*(n-1))!/(2*n!*(n-3)!)); /* Joerg Arndt, Sep 28 2012 */
    

Formula

G.f.: (1/2)*(1-(1 - 6*t + 6*t^2)/(1-4*t)^(3/2)).
a(n+3) = (2*(n+2))!/(2*n!*(n+3)!). - Wolfdieter Lang
a(n+2) = Sum_{k=0..n} k*binomial(k+n, k). - Benoit Cloitre, Oct 25 2003
a(n) = Sum_{k=2..n} Sum_{j=1..n} binomial(2*n,n)/(2*(n+1)), n >= 0. - Zerinvary Lajos, May 09 2007
a(n) = (n-2)*binomial(2n-2, n-2)/2 + 0^n. - Wesley Ivan Hurt, Sep 24 2014
E.g.f.: (1 + exp(2*x) * ((2*x - 1) * BesselI(0,2*x) - x * BesselI(1,2*x))) / 2. - Ilya Gutkovskiy, Nov 03 2021
From Amiram Eldar, Mar 22 2022: (Start)
Sum_{n>=3} 1/a(n) = 3 - 4*Pi/(3*sqrt(3)).
Sum_{n>=3} (-1)^(n+1)/a(n) = 16*log(phi)/sqrt(5) - 3, where phi is the golden ratio (A001622). (End)

Extensions

Name clarified by Noam Zeilberger, Aug 18 2017

A290605 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of 2/(1 + sqrt(1 - 4*k*x)).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 8, 5, 0, 1, 4, 18, 40, 14, 0, 1, 5, 32, 135, 224, 42, 0, 1, 6, 50, 320, 1134, 1344, 132, 0, 1, 7, 72, 625, 3584, 10206, 8448, 429, 0, 1, 8, 98, 1080, 8750, 43008, 96228, 54912, 1430, 0, 1, 9, 128, 1715, 18144, 131250, 540672, 938223, 366080, 4862, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 07 2017

Keywords

Comments

Number of 2n-length strings of balanced parentheses of at most k different types. Also number of binary trees with n inner nodes of at most k different dimensions. - Alois P. Heinz, Oct 28 2019

Examples

			G.f. of column k: A(x) = 1 + k*x + 2*k^2*x^2 + 5*k^3*x^3 + 14*k^4*x^4 + 42*k^5*x^5 + 132*k^6*x^6 + ...
Square array begins:
  1,   1,     1,      1,      1,       1,  ...
  0,   1,     2,      3,      4,       5,  ...
  0,   2,     8,     18,     32,      50,  ...
  0,   5,    40,    135,    320,     625,  ...
  0,  14,   224,   1134,   3584,    8750,  ...
  0,  42,  1344,  10206,  43008,  131250,  ...
		

Crossrefs

Rows n=0-2 give: A000012, A001477, A001105.
Main diagonal gives A291699.

Programs

  • Maple
    ctln:= proc(n) option remember; binomial(2*n, n)/(n+1) end:
    A:= proc(n, k) option remember; k^n*ctln(n) end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Oct 28 2019
  • Mathematica
    Table[Function[k, SeriesCoefficient[2/(1 + Sqrt[1 - 4 k x]), {x, 0, n}]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten
    Table[Function[k, SeriesCoefficient[1/(1 + ContinuedFractionK[-k x, 1, {i, 1, n}]), {x, 0, n}]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten

Formula

A(n,k) = k^n*(2*n)!/(n!*(n + 1)!).
A(n,k) = k^n*A000108(n).
G.f. of column k: 2/(1 + sqrt(1 - 4*k*x)).
G.f. of column k: 1/(1 - k*x/(1 - k*x/(1 - k*x/(1 - k*x/(1 - k*x/(1 - ...)))))), a continued fraction.
E.g.f. of column k: (BesselI(0,2*k*x) - BesselI(1,2*k*x))*exp(2*k*x).
If g.f. = 2/(1 + sqrt(1 - 4*k*x)), then a(n) ~ k^n*4^n/(sqrt(Pi)*n^(3/2)).
A(n,k) = Sum_{i=0..k} binomial(k,i) * A256061(n,k-i). - Alois P. Heinz, Oct 28 2019
For fixed k >= 1, Sum_{n>=0} 1/A(n,k) = 2*k*(8*k + 1) / (4*k - 1)^2 + 24 * k^2 * arcsin(1/(2*sqrt(k))) / (4*k - 1)^(5/2). - Vaclav Kotesovec, Nov 23 2021
For fixed k >= 1, Sum_{n>=0} (-1)^n / A(n,k) = 2*k*(8*k - 1) / (4*k + 1)^2 - 24 * k^2 * log((1 + sqrt(4*k + 1))/(2*sqrt(k))) / (4*k + 1)^(5/2). - Vaclav Kotesovec, Nov 24 2021

A256061 Number T(n,k) of 2n-length strings of balanced parentheses of exactly k different types; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 4, 0, 5, 30, 30, 0, 14, 196, 504, 336, 0, 42, 1260, 6300, 10080, 5040, 0, 132, 8184, 71280, 205920, 237600, 95040, 0, 429, 54054, 774774, 3603600, 7207200, 6486480, 2162160, 0, 1430, 363220, 8288280, 58378320, 180180000, 273873600, 201801600, 57657600
Offset: 0

Views

Author

Alois P. Heinz, Mar 13 2015

Keywords

Comments

Also number of binary trees with n inner nodes of exactly k different dimensions. T(2,2) = 4:
: balanced parentheses : ([]) : [()] : ()[] : []() :
:----------------------:-------:-------:-------:-------:
: trees : (1) : [2] : (1) : [2] :
: : / \ : / \ : / \ : / \ :
: : [2] : (1) : [2] : (1) :
: : / \ : / \ : / \ : / \ :

Examples

			A(3,2) = 30: (())[], (()[]), (([])), ()()[], ()([]), ()[()], ()[[]], ()[](), ()[][], ([()]), ([[]]), ([]()), ([])(), ([])[], ([][]), [(())], [()()], [()[]], [()](), [()][], [([])], [[()]], [[]()], [[]](), [](()), []()(), []()[], []([]), [][()], [][]().
Triangle T(n,k) begins:
  1;
  0,   1;
  0,   2,     4;
  0,   5,    30,     30;
  0,  14,   196,    504,     336;
  0,  42,  1260,   6300,   10080,    5040;
  0, 132,  8184,  71280,  205920,  237600,   95040;
  0, 429, 54054, 774774, 3603600, 7207200, 6486480, 2162160;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A000108 (for n>0).
Main diagonal gives A001761.

Programs

  • Maple
    ctln:= proc(n) option remember; binomial(2*n, n)/(n+1) end:
    A:= proc(n, k) option remember; k^n*ctln(n) end:
    T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    A[0, 0] = 1; A[n_, k_] := A[n, k] = k^n*CatalanNumber[n]; T[n_, k_] := Sum[A[n, k-i]*(-1)^i*Binomial[k, i], {i, 0, k}]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 20 2017, translated from Maple *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^i * C(k,i) * (k-i)^n * A000108(n).
T(n,k) = k! * A253180(n,k).
T(n,k) = Sum_{i=0..k} (-1)^i * C(k,i) * A290605(n,k-i). - Alois P. Heinz, Oct 28 2019

A064299 a(n) = B(n)*C(n), where B(n) are Bell numbers (A000110) and C(n) are Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 4, 25, 210, 2184, 26796, 376233, 5920200, 102816714, 1947916100, 39890416020, 876478739164, 20537052247300, 510548782729680, 13407568735200525, 370553407586717490, 10742998644116921160, 325786278993936753300, 10307990595756667951830
Offset: 0

Views

Author

Karol A. Penson, Sep 05 2001

Keywords

Comments

From Joerg Arndt, Oct 22 2012: (Start)
Number of strings of length 2*n of up to n different types t(k) of balanced parentheses, where the first appearance of type t(k) must precede the appearance of t(k+1) for all k
For example, from the 5 parenthesis string of length 3
1: ()()(); 2: ()(()); 3: (())(); 4: (()()); 5: ((())).
we obtain the B(3) * C(3) = 5 * 5 = 25 strings
1: ()()(), ()()[], ()[](), ()[][], ()[]{};
2: ()(()), ()([]), ()[()], ()[[]], ()[{}];
3: (())(), (())[], ([])(), ([])[], ([]){};
4: (()()), (()[]), ([]()), ([][]), ([]{});
5: ((())), (([])), ([()]), ([[]]), ([{}]).
(End)

Crossrefs

Row sums of A253180.

Programs

  • Maple
    with(combinat):
    ctln:= proc(n) option remember; binomial(2*n, n)/(n+1) end:
    a:= n-> bell(n)*ctln(n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Mar 23 2015
  • Mathematica
    a[n_] := BellB[n]*CatalanNumber[n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 25 2017 *)
  • Python
    from itertools import count, accumulate, islice
    def A064299_gen(): # generator of terms
        yield from (1,1)
        blist, b, m = (1,2), 1, 1
        for n in count(1):
            blist = list(accumulate(blist, initial=(b:=blist[-1])))
            yield b*(m := m*(4*n+2)//(n+2))
    A064299_list = list(islice(A064299_gen(),20)) # Chai Wah Wu, Jun 22 2022
  • Sage
    [bell_number(i)*catalan_number(i) for i in range(17)] # Zerinvary Lajos, Mar 14 2009
    

Formula

Integral representation as n-th moment of a positive function on a positive half-axis, in Maple notation: a(n) = int(x^n*sum(sqrt((4*k-x)/x)*Heaviside(4*k-x)/(k*k!), k = 1..infinity)/(2*Pi*exp(1)), x = 0..infinity); this representation is unique.

A258399 Number of 4n-length strings of balanced parentheses of exactly n different types that are introduced in ascending order.

Original entry on oeis.org

1, 2, 98, 11880, 2432430, 714249900, 275335499824, 131928199603200, 75727786603836510, 50713478000403718500, 38843740303576863755100, 33508462196084294380001040, 32157574295254903735909896240, 33990046387543889224733323929120
Offset: 0

Author

Alois P. Heinz, May 28 2015

Keywords

Examples

			a(0) = 1: the empty string.
a(1) = 2: ()(), (()).
a(2) = A000108(4) * (2^3-1) = 14*7 = 98.
		

Programs

  • Maple
    ctln:= proc(n) option remember; binomial(2*n, n)/(n+1) end:
    A:= proc(n, k) option remember; k^n*ctln(n) end:
    a:= n-> add(A(2*n, n-i)*(-1)^i/((n-i)!*i!), i=0..n):
    seq(a(n), n=0..15);
  • Mathematica
    A[n_, k_] := A[n, k] = k^n CatalanNumber[n];
    a[n_] := If[n==0, 1, Sum[A[2n, n-i] (-1)^i/((n-i)! i!), {i, 0, n}]];
    a /@ Range[0, 15] (* Jean-François Alcover, Jan 01 2021, after Alois P. Heinz *)

Formula

a(n) = A253180(2n,n).
a(n) ~ c * d^n * n! / n^(5/2), where d = A256254 = -64/(LambertW(-2*exp(-2))*(2 + LambertW(-2*exp(-2)))) = 98.8248737517356857317..., c = 1/(2^(5/2) * Pi^(3/2) * sqrt(1 + LambertW(-2*exp(-2)))) = 0.0412044746356859529237459292541572856326... . - Vaclav Kotesovec, Jun 01 2015, updated Sep 27 2023
a(n) = A210029(n) * (4*n)! / (n! * (2*n)! * (2*n + 1)!), for n>0. - Vaclav Kotesovec, Sep 27 2023

A258390 Number of 2n-length strings of balanced parentheses of exactly 2 different types that are introduced in ascending order.

Original entry on oeis.org

2, 15, 98, 630, 4092, 27027, 181610, 1239810, 8582756, 60138078, 425800564, 3042175500, 21906338040, 158830645635, 1158564772890, 8496271312650, 62604582047700, 463275674416170, 3441483002640540, 25654715940496500, 191852749820189640, 1438895966711035950
Offset: 2

Author

Alois P. Heinz, May 28 2015

Keywords

Crossrefs

Column k=2 of A253180.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [0$2, 2][n+1],
          (2*n-1)*(6*n*a(n-1) -8*(2*n-3)*a(n-2))/(n*(n+1)))
        end:
    seq(a(n), n=2..25);
  • Mathematica
    Table[(2^(n-1)-1)*Binomial[2n,n]/(n+1),{n,2,20}] (* Vaclav Kotesovec, Jun 01 2015 *)

Formula

a(n) = (2*n-1)*(6*n*a(n-1)-8*(2*n-3)*a(n-2))/(n*(n+1)) for n>2, a(2)=2, a(n)=0 for n<2.
a(n) = (2^(n-1)-1) * binomial(2n,n)/(n+1) = (2^(n-1)-1)*A000108(n). - Vaclav Kotesovec, Jun 01 2015

A258391 Number of 2n-length strings of balanced parentheses of exactly 3 different types that are introduced in ascending order.

Original entry on oeis.org

5, 84, 1050, 11880, 129129, 1381380, 14707550, 156706680, 1675459786, 17998446312, 194361212500, 2110052926800, 23026236054345, 252513376831620, 2781895215981750, 30778564965687000, 341873708072702190, 3811170628172227320, 42628644369844747500
Offset: 3

Author

Alois P. Heinz, May 28 2015

Keywords

Crossrefs

Column k=3 of A253180.

Formula

Recurrence: (n-1)*n*(n+1)*a(n) = 12*(n-1)*n*(2*n - 1)*a(n-1) - 44*(n-1)*(2*n - 3)*(2*n - 1)*a(n-2) + 48*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-3). - Vaclav Kotesovec, Jun 01 2015
a(n) ~ 12^n / (6*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 01 2015

A258392 Number of 2n-length strings of balanced parentheses of exactly 4 different types that are introduced in ascending order.

Original entry on oeis.org

14, 420, 8580, 150150, 2432430, 37777740, 572827580, 8568059500, 127199546012, 1881416537000, 27792098497800, 410634370077750, 6074408847920670, 90017212151219100, 1336818529866319500, 19898794932394570500, 296909055625560798420, 4440849374395184751000
Offset: 4

Author

Alois P. Heinz, May 28 2015

Keywords

Crossrefs

Column k=4 of A253180.

Formula

Recurrence: (n-2)*(n-1)*n*(n+1)*a(n) = 20*(n-2)*(n-1)*n*(2*n - 1)*a(n-1) - 140*(n-2)*(n-1)*(2*n - 3)*(2*n - 1)*a(n-2) + 400*(n-2)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-3) - 384*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-4). - Vaclav Kotesovec, Jun 01 2015
a(n) ~ 16^n / (24*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 01 2015

A258393 Number of 2n-length strings of balanced parentheses of exactly 5 different types that are introduced in ascending order.

Original entry on oeis.org

42, 1980, 60060, 1501500, 33795762, 714249900, 14504269780, 286931752800, 5578065392900, 107178276605400, 2043352620527400, 38758743724018500, 732849800716048290, 13831507110589591500, 260829110106412824900, 4917878997439418010000, 92758042341429880435020
Offset: 5

Author

Alois P. Heinz, May 28 2015

Keywords

Crossrefs

Column k=5 of A253180.

Formula

Recurrence: (n-3)*(n-2)*(n-1)*n*(n+1)*a(n) = 30*(n-3)*(n-2)*(n-1)*n*(2*n - 1)*a(n-1) - 340*(n-3)*(n-2)*(n-1)*(2*n - 3)*(2*n - 1)*a(n-2) + 1800*(n-3)*(n-2)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-3) - 4384*(n-3)*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-4) + 3840*(2*n - 9)*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-5). - Vaclav Kotesovec, Jun 01 2015
a(n) ~ 20^n / (120*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 01 2015

A258394 Number of 2n-length strings of balanced parentheses of exactly 6 different types that are introduced in ascending order.

Original entry on oeis.org

132, 9009, 380380, 12864852, 383402292, 10551322782, 275335499824, 6924802684800, 169656773406120, 4078556074277685, 96700630711999860, 2269529269318731420, 52868514692841609300, 1224857602490265215010, 28265620407321158141280, 650452332645092821924080
Offset: 6

Author

Alois P. Heinz, May 28 2015

Keywords

Crossrefs

Column k=6 of A253180.

Formula

Recurrence: (n-4)*(n-3)*(n-2)*(n-1)*n*(n+1)*a(n) = 42*(n-4)*(n-3)*(n-2)*(n-1)*n*(2*n - 1)*a(n-1) - 700*(n-4)*(n-3)*(n-2)*(n-1)*(2*n - 3)*(2*n - 1)*a(n-2) + 5880*(n-4)*(n-3)*(n-2)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-3) - 25984*(n-4)*(n-3)*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-4) + 56448*(n-4)*(2*n - 9)*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-5) - 46080*(2*n - 11)*(2*n - 9)*(2*n - 7)*(2*n - 5)*(2*n - 3)*(2*n - 1)*a(n-6). - Vaclav Kotesovec, Jun 01 2015
a(n) ~ 24^n / (720*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 01 2015
Showing 1-10 of 14 results. Next