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

A227543 Triangle defined by g.f. A(x,q) such that: A(x,q) = 1 + x*A(q*x,q)*A(x,q), as read by terms k=0..n*(n-1)/2 in rows n>=0.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 3, 2, 1, 1, 1, 4, 6, 7, 7, 5, 5, 3, 2, 1, 1, 1, 5, 10, 14, 17, 16, 16, 14, 11, 9, 7, 5, 3, 2, 1, 1, 1, 6, 15, 25, 35, 40, 43, 44, 40, 37, 32, 28, 22, 18, 13, 11, 7, 5, 3, 2, 1, 1, 1, 7, 21, 41, 65, 86, 102, 115, 118, 118, 113, 106, 96, 85, 73, 63, 53, 42, 34, 26, 20, 15, 11, 7, 5, 3, 2, 1, 1
Offset: 0

Views

Author

Paul D. Hanna, Jul 15 2013

Keywords

Comments

See related triangle A138158.
Row sums are the Catalan numbers (A000108), set q=1 in the g.f. to see this.
Antidiagonal sums equal A005169, the number of fountains of n coins.
The maximum in each row of the triangle is A274291. - Torsten Muetze, Nov 28 2018
The area between a Dyck path and the x-axis may be decomposed into unit area triangles of two types - up-triangles with vertices at the integer lattice points (x, y), (x+1, y+1) and (x+2, y) and down-triangles with vertices at the integer lattice points (x, y), (x-1, y+1) and (x+1, y+1). The table entry T(n,k) equals the number of Dyck paths of semilength n containing k down triangles. See the illustration in the Links section. Cf. A239927. - Peter Bala, Jul 11 2019
The row polynomials of this table are a q-analog of the Catalan numbers due to Carlitz and Riordan. For MacMahon's q-analog of the Catalan numbers see A129175. - Peter Bala, Feb 28 2023

Examples

			G.f.: A(x,q) = 1 + x*(1) + x^2*(1 + q) + x^3*(1 + 2*q + q^2 + q^3)
 + x^4*(1 + 3*q + 3*q^2 + 3*q^3 + 2*q^4 + q^5 + q^6)
 + x^5*(1 + 4*q + 6*q^2 + 7*q^3 + 7*q^4 + 5*q^5 + 5*q^6 + 3*q^7 + 2*q^8 + q^9 + q^10)
 + x^6*(1 + 5*q + 10*q^2 + 14*q^3 + 17*q^4 + 16*q^5 + 16*q^6 + 14*q^7 + 11*q^8 + 9*q^9 + 7*q^10 + 5*q^11 + 3*q^12 + 2*q^13 + q^14 + q^15) +...
where g.f.A(x,q) = Sum_{k=0..n*(n-1)/2, n>=0} T(n,k)*x^n*q^k
satisfies A(x,q) = 1 + x*A(q*x,q)*A(x,q).
This triangle of coefficients T(n,k) in A(x,q) begins:
 1;
 1;
 1, 1;
 1, 2, 1, 1;
 1, 3, 3, 3, 2, 1, 1;
 1, 4, 6, 7, 7, 5, 5, 3, 2, 1, 1;
 1, 5, 10, 14, 17, 16, 16, 14, 11, 9, 7, 5, 3, 2, 1, 1;
 1, 6, 15, 25, 35, 40, 43, 44, 40, 37, 32, 28, 22, 18, 13, 11, 7, 5, 3, 2, 1, 1;
 1, 7, 21, 41, 65, 86, 102, 115, 118, 118, 113, 106, 96, 85, 73, 63, 53, 42, 34, 26, 20, 15, 11, 7, 5, 3, 2, 1, 1;
 1, 8, 28, 63, 112, 167, 219, 268, 303, 326, 338, 338, 331, 314, 293, 268, 245, 215, 190, 162, 139, 116, 97, 77, 63, 48, 38, 28, 22, 15, 11, 7, 5, 3, 2, 1, 1; ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Module[{P, Q},
    P = Sum[q^(m^2) (-x)^m/Product[1-q^j, {j, 1, m}] + x O[x]^n, {m, 0, n}];
    Q = Sum[q^(m(m-1)) (-x)^m/Product[1-q^j, {j, 1, m}] + x O[x]^n, {m, 0, n}];
    SeriesCoefficient[P/Q, {x, 0, n}, {q, 0, k}]
    ];
    Table[T[n, k], {n, 0, 10}, {k, 0, n(n-1)/2}] // Flatten (* Jean-François Alcover, Jul 27 2018, from PARI *)
  • PARI
    /* From g.f. A(x,q) = 1 + x*A(q*x,q)*A(x,q): */
    {T(n, k)=local(A=1); for(i=1, n, A=1+x*subst(A, x, q*x)*A +x*O(x^n)); polcoeff(polcoeff(A, n, x), k, q)}
    for(n=0, 10, for(k=0, n*(n-1)/2, print1(T(n, k), ", ")); print(""))
    
  • PARI
    /* By Ramanujan's continued fraction identity: */
    {T(n,k)=local(P=1,Q=1);
    P=sum(m=0,n,q^(m^2)*(-x)^m/prod(k=1,m,1-q^k)+x*O(x^n));
    Q=sum(m=0,n,q^(m*(m-1))*(-x)^m/prod(k=1,m,1-q^k)+x*O(x^n));
    polcoeff(polcoeff(P/Q,n,x),k,q)}
    for(n=0, 10, for(k=0, n*(n-1)/2, print1(T(n, k), ", ")); print(""))
    
  • PARI
    P(x, n) =
    {
        if ( n<=1, return(1) );
        return( sum( i=0, n-1, P(x, i) * P(x, n-1 -i) * x^((i+1)*(n-1 -i)) ) );
    }
    for (n=0, 10, print( Vec( P(x, n) ) ) ); \\ Joerg Arndt, Jan 23 2024
    
  • PARI
    \\ faster with memoization:
    N=11;
    VP=vector(N+1);  VP[1] =VP[2] = 1;  \\ one-based; memoization
    P(n) = VP[n+1];
    for (n=2, N, VP[n+1] = sum( i=0, n-1, P(i) * P(n-1 -i) * x^((i+1)*(n-1-i)) ) );
    for (n=0, N, print( Vec( P(n) ) ) ); \\ Joerg Arndt, Jan 23 2024

Formula

G.f.: A(x,q) = 1/(1 - x/(1 - q*x/(1 - q^2*x/(1 - q^3*x/(1 - q^4*x/(1 -...)))))), a continued fraction.
G.f. satisfies: A(x,q) = P(x,q)/Q(x,q), where
P(x,q) = Sum_{n>=0} q^(n^2) * (-x)^n / Product_{k=1..n} (1-q^k),
Q(x,q) = Sum_{n>=0} q^(n*(n-1)) * (-x)^n / Product_{k=1..n} (1-q^k),
due to Ramanujan's continued fraction identity.
...
Sum_{k=0..n*(n-1)/2} T(n,k)*k = 2^(2*n-1) - C(2*n+1,n) + C(2*n-1,n-1) = A006419(n-1) for n>=1.
Logarithmic derivative of the g.f. A(x,q), wrt x, yields triangle A227532.
From Peter Bala, Jul 11 2019: (Start)
(n+1)th row polynomial R(n+1,q) = Sum_{k = 0..n} q^k*R(k,x)*R(n-k,q), with R(0,q) = 1.
1/A(q*x,q) is the generating function for the triangle A047998. (End)
Conjecture: b(n) = P(n, n) where b(n) is an integer sequence with g.f. B(x) = 1/(1 - f(0)*x/(1 - f(1)*x/(1 - f(2)*x/(1 - f(3)*x/(1 - f(4)*x/(1 -...)))))), P(n, k) = P(n-1, k) + f(n-k)*P(n, k-1) for 0 < k <= n with P(n, k) = 0 for k > n, P(n, 0) = 1 for n >= 0 and where f(n) is an arbitrary function. In fact for this sequence we have f(n) = q^n. - Mikhail Kurkov, Sep 26 2024

A342981 Triangle read by rows: T(n,k) is the number of rooted planar maps with n edges, k faces and no isthmuses, n >= 0, k = 1..n+1.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 7, 5, 0, 1, 16, 37, 14, 0, 1, 30, 150, 176, 42, 0, 1, 50, 449, 1104, 794, 132, 0, 1, 77, 1113, 4795, 7077, 3473, 429, 0, 1, 112, 2422, 16456, 41850, 41504, 14893, 1430, 0, 1, 156, 4788, 47832, 189183, 319320, 228810, 63004, 4862
Offset: 0

Views

Author

Andrew Howroyd, Apr 02 2021

Keywords

Comments

The number of vertices is n + 2 - k.
For k >= 2, column k is a polynomial of degree 3*(k-2). This is because adding a face can increase the number of vertices whose degree is greater than two by at most two.
By duality, also the number of loopless rooted planar maps with n edges and k vertices.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1,   2;
  0, 1,   7,    5;
  0, 1,  16,   37,    14;
  0, 1,  30,  150,   176,    42;
  0, 1,  50,  449,  1104,   794,   132;
  0, 1,  77, 1113,  4795,  7077,  3473,   429;
  0, 1, 112, 2422, 16456, 41850, 41504, 14893, 1430;
  ...
		

Crossrefs

Columns k=3..4 are A005581, A006468.
Diagonals are A000108, A006419, A006420, A006421.
Row sums are A000260.

Programs

  • Mathematica
    G[m_, y_] := Sum[x^n*Sum[(n + k - 1)!*(2*n - k)!*y^k/(k!*(n + 1 - k)!*(2*k - 1)!*(2*n - 2*k + 1)!), {k, 1, n}], {n, 1, m}] + O[x]^m;
    H[n_] := With[{g = 1 + x*y + x*G[n - 1, y]}, Sqrt[InverseSeries[x/g^2 + O[x]^(n + 1), x]/x]];
    CoefficientList[#, y]& /@ CoefficientList[H[10], x] // Flatten (* Jean-François Alcover, Apr 15 2021, after Andrew Howroyd *)
  • PARI
    \\ here G(n, y) gives A082680 as g.f.
    G(n,y)={sum(n=1, n, x^n*sum(k=1, n, (n+k-1)!*(2*n-k)!*y^k/(k!*(n+1-k)!*(2*k-1)!*(2*n-2*k+1)!))) + O(x*x^n)}
    H(n)={my(g=1+x*y+x*G(n-1, y), v=Vec(sqrt(serreverse(x/g^2)/x))); vector(#v, n, Vecrev(v[n], n))}
    { my(T=H(8)); for(n=1, #T, print(T[n])) }

Formula

G.f. A(x,y) satisfies A(x) = G(x*A(x,y)^2, y) where G(x,y) = 1 + x*y + x*B(x,y) and B(x,y) is the g.f. of A082680.
A027836(n+1) = Sum_{k=1..n+1} k*T(n,k).
A002293(n) = Sum_{k=1..n+1} k*T(n,n+2-k).

A090285 Triangle T(n,k), 0<=k<=n, read by rows, defined by: T(n,k)=0 if k>n, T(n,0) = A000108(n); T(n+1,k)= Sum_{j=0..n} T(n-j,k-1)*binomial(2j+1,j+1).

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 5, 15, 7, 1, 14, 56, 37, 10, 1, 42, 210, 176, 68, 13, 1, 132, 792, 794, 392, 108, 16, 1, 429, 3003, 3473, 2063, 731, 157, 19, 1, 1430, 11440, 14893, 10254, 4395, 1220, 215, 22, 1, 4862, 43758, 63004, 49024, 24465, 8249, 1886, 282, 25, 1
Offset: 0

Views

Author

Philippe Deléham, Jan 24 2004

Keywords

Comments

The matrix inverse starts
1;
-1, 1;
2, -4, 1;
-4, 13, -7, 1;
8, -38, 33, -10, 1;
-16, 104, -129, 62, -13, 1;
32, -272, 450, -304, 100, -16, 1;
-64, 688, -1452, 1289, -590, 147, -19, 1;
128, -1696, 4424, -4942, 2945, -1014, 203, -22, 1;
- R. J. Mathar, Mar 15 2013
Riordan array (c(x), x*c(x)^2/(1-x*c(x)^2)) where c(x) is the g.f. for the Catalan numbers (A000108). - Philippe Deléham, Jun 02 2013
The matrix inverse is the Riordan array ((1+x)/(1+2*x), x*(1+x)/(1+2*x)^2). - Philippe Deléham, Jan 26 2014

Crossrefs

See also A001700 for binomial(2n+1,n+1).

Programs

  • Maple
    A090285 := proc(n,k)
        if k < 0 or k > n then
            0 ;
        elif k = 0 then
            A000108(n)
        else
            add(procname(n-1-j,k-1)*binomial(2*j+1,j+1),j=0..n-1) ;
        end if;
    end proc: # R. J. Mathar, Mar 15 2013
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, CatalanNumber@ n, Sum[T[(n - 1) - j, k - 1] Binomial[2 j + 1, j + 1], {j, 0, n - 1}]]; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jun 26 2017 *)

Formula

T(n, 1) = n*A000108(n) = A001791(n) .
T(n, 2) = 2^(2n-1) - binomial(2n+1, n) + binomial(2n-1, n-1) = A006419(n).

A386612 a(n) = Sum_{k=0..n-1} binomial(4*k+1,k) * binomial(4*n-4*k,n-k-1).

Original entry on oeis.org

0, 1, 13, 142, 1464, 14689, 145154, 1420812, 13818784, 133793940, 1291073809, 12426782294, 119371355672, 1144851458526, 10965655515588, 104919037771224, 1002960800712720, 9580390527192940, 91453374122574372, 872513477065735768, 8320168165323802464, 79305962393873976417
Offset: 0

Views

Author

Seiichi Manyama, Jul 27 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(4*k+1, k)*binomial(4*n-4*k, n-k-1));

Formula

G.f.: g^3 * (g-1)/(4-3*g)^2 where g=1+x*g^4.
G.f.: g/((1-g)^2 * (1-4*g)^2) where g*(1-g)^3 = x.
a(n) = Sum_{k=0..n-1} binomial(4*k+1+l,k) * binomial(4*n-4*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 3^(n-k-1) * binomial(4*n+2,k).
a(n) = Sum_{k=0..n-1} 4^(n-k-1) * binomial(3*n+k+2,k).
D-finite with recurrence 13122*n*(3*n+2)*(3*n+1)*a(n) +81*(-124803*n^3+284553*n^2-210740*n+42140)*a(n-1) +24*(7476768*n^3-29253744*n^2+37920106*n-16562575)*a(n-2) +40960*(-26344*n^3+148032*n^2-282329*n+185874)*a(n-3) +55050240*(2*n-5)*(4*n-13)*(4*n-11)*a(n-4)=0. - R. J. Mathar, Aug 10 2025

A386614 a(n) = Sum_{k=0..n-1} binomial(5*k+1,k) * binomial(5*n-5*k,n-k-1).

Original entry on oeis.org

0, 1, 16, 220, 2880, 36850, 465536, 5834852, 72744640, 903525715, 11191199200, 138323478980, 1706860996096, 21034268215120, 258934785258240, 3184696786012500, 39140208951032960, 480734044749851305, 5901368553964031600, 72410017973538837880, 888114187330722044800, 10888921795007470528060
Offset: 0

Views

Author

Seiichi Manyama, Jul 27 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(5*k+1, k)*binomial(5*n-5*k, n-k-1));

Formula

G.f.: g^3 * (g-1)/(5-4*g)^2 where g=1+x*g^5.
G.f.: g/((1-g)^2 * (1-5*g)^2) where g*(1-g)^4 = x.
a(n) = Sum_{k=0..n-1} binomial(5*k+1+l,k) * binomial(5*n-5*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 4^(n-k-1) * binomial(5*n+2,k).
a(n) = Sum_{k=0..n-1} 5^(n-k-1) * binomial(4*n+k+2,k).
D-finite with recurrence +35651584*n*(4*n+1)*(2*n+1)*(4*n-1)*a(n) +8192*(56348704*n^4-268019168*n^3+418502324*n^2-264019618*n+57303885)*a(n-1) +160*(-65524820000*n^4+314102050000*n^3-463341186250*n^2+159732814775*n+76118151939)*a(n-2) +62500*(660806875*n^4-1813661250*n^3-5080986250*n^2+20705993100*n-17279228304)*a(n-3) +308935546875*(5*n-11)*(5*n-14)*(5*n-13)*(5*n-17)*a(n-4)=0. - R. J. Mathar, Aug 10 2025

A386616 a(n) = Sum_{k=0..n-1} binomial(6*k+1,k) * binomial(6*n-6*k,n-k-1).

Original entry on oeis.org

0, 1, 19, 315, 5000, 77785, 1196667, 18282742, 278031900, 4214278350, 63723788295, 961789682008, 14495501585664, 218216042892175, 3281961694927950, 49322417450239980, 740753733463215604, 11118981305235476010, 166821561372208253850, 2501861335268901337425, 37507747177968865536840
Offset: 0

Views

Author

Seiichi Manyama, Jul 27 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(6*k+1, k)*binomial(6*n-6*k, n-k-1));

Formula

G.f.: g^3 * (g-1)/(6-5*g)^2 where g=1+x*g^6.
G.f.: g/((1-g)^2 * (1-6*g)^2) where g*(1-g)^5 = x.
a(n) = Sum_{k=0..n-1} binomial(6*k+1+l,k) * binomial(6*n-6*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 5^(n-k-1) * binomial(6*n+2,k).
a(n) = Sum_{k=0..n-1} 6^(n-k-1) * binomial(5*n+k+2,k).

A386617 a(n) = Sum_{k=0..n-1} binomial(3*k+1,k) * binomial(3*n-3*k,n-k-1).

Original entry on oeis.org

0, 1, 10, 81, 610, 4436, 31626, 222681, 1554772, 10790721, 74560728, 513452604, 3526463304, 24168921568, 165357919850, 1129724254953, 7709039995368, 52551835079699, 357930487932282, 2436038623348521, 16568626556643738, 112626521811112464, 765201654587796312, 5196570956399432796
Offset: 0

Views

Author

Seiichi Manyama, Jul 27 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, binomial(3*k+1, k)*binomial(3*n-3*k, n-k-1));

Formula

G.f.: g^3 * (g-1)/(3-2*g)^2 where g=1+x*g^3.
G.f.: g/((1-g)^2 * (1-3*g)^2) where g*(1-g)^2 = x.
a(n) = Sum_{k=0..n-1} binomial(3*k+1+l,k) * binomial(3*n-3*k-l,n-k-1) for every real number l.
a(n) = Sum_{k=0..n-1} 2^(n-k-1) * binomial(3*n+2,k).
a(n) = Sum_{k=0..n-1} 3^(n-k-1) * binomial(2*n+k+2,k).

A138156 Sum of the path lengths of all binary trees with n edges.

Original entry on oeis.org

0, 2, 14, 74, 352, 1588, 6946, 29786, 126008, 527900, 2195580, 9080772, 37392864, 153434536, 627778954, 2562441466, 10438340104, 42449348236, 172376641924, 699100282156, 2832205421824, 11462854280536, 46354571222164
Offset: 0

Views

Author

Emeric Deutsch, Mar 20 2008

Keywords

Comments

a(n) = 2*A006419(n).
If (2*n+3) prime, then A138156(n) mod (2*n+3) == 0. - Alzhekeyev Ascar M, Jul 19 2011

Examples

			a(1) = 2 because the trees with one edge are (i) root with a left child and (ii) root with a right child, each having path length 1.
		

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1997, Vol. 1, p. 405 (exercise 5) and p. 595 (solution).

Crossrefs

Programs

  • Maple
    a:= n-> 4^(n+1)-(3*n+4)*binomial(2*n+2, n+1)/(n+2): seq(a(n), n=0..22);
  • Mathematica
    Table[4^(n+1)-(3n+4) Binomial[2n+2,n+1]/(n+2),{n,0,30}] (* Harvey P. Dale, Dec 14 2014 *)

Formula

a(n) = 4^(n+1) - (3*n+4) * C(2*n+2,n+1)/(n+2).
G.f.: 1/(z*(1-4*z)) - ((1-z)/sqrt(1-4*z)-1)/z^2.
D-finite with recurrence (n+2)*a(n) +(-9*n-10)*a(n-1) +2*(12*n+1)*a(n-2) +8*(-2*n+3)*a(n-3)=0. - R. J. Mathar, Jul 26 2022

A104268 a(n) = 2*4^(n-1) - (3n-1)/(2n+2)*C(2n,n).

Original entry on oeis.org

1, 3, 12, 51, 218, 926, 3902, 16323, 67866, 280746, 1156576, 4748398, 19439332, 79391708, 323584322, 1316578403, 5348814842, 21702312818, 87955584152, 356114261498, 1440568977932, 5822909703908, 23520345224732
Offset: 1

Views

Author

Ralf Stephan, Apr 17 2005

Keywords

Comments

Cardinality of the set of nesting-similarity classes.
Number of Lyngsø-Pedersen structures with n arcs [Saule et al., Theorem 1]. - Eric M. Schmidt, Sep 20 2017

Crossrefs

Equals A006419(n-1) + A000108(n).

Programs

  • Mathematica
    Table[2 4^(n-1)-(3n-1)/(2n+2) Binomial[2n,n],{n,30}] (* Harvey P. Dale, Oct 03 2011 *)

Formula

G.f.: C+z^2(2zC'+C)^2C, with C(z) the g.f. of the Catalan numbers.
G.f.: (x*(8*x+5*Sqrt[1-4 x]-9)-2*Sqrt[1-4 x]+2)/(2*(1-4*x)*x^2). [Harvey P. Dale, Oct 03 2011]
D-finite with recurrence 2*(n+1)*a(n) +(-21*n+1)*a(n-1) +2*(36*n-43)*a(n-2) +40*(-2*n+5)*a(n-3)=0. - R. J. Mathar, Jun 08 2016
Showing 1-9 of 9 results.