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 10 results.

A239928 Expansion of F(x^2, x) where F(x,y) is the g.f. of A239927.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 1, 1, 4, 3, 2, 5, 6, 4, 6, 10, 8, 9, 15, 15, 15, 22, 26, 26, 33, 43, 45, 52, 69, 76, 85, 109, 127, 141, 173, 209, 235, 278, 340, 390, 452, 550, 643, 742, 890, 1054, 1221, 1445, 1720, 2007, 2356, 2803, 3291, 3853, 4568, 5385, 6309, 7450, 8800, 10330, 12164, 14372, 16905, 19879
Offset: 0

Views

Author

Joerg Arndt, Mar 29 2014

Keywords

Comments

What does this sequence count?

Crossrefs

Cf. A000108 (F(1, x)), A143951 (F(x, 1)), A005169 (F(x, x), with interlaced zeros), A227310 (F(x, x^2)).

Programs

  • PARI
    N=66; x='x+O('x^N);
    F(x, y, d=0)=if (d>N, 1, 1 / (1-x*y * F(x, x^2*y, d+1) ) );
    Vec( F(x^2, x) )

Formula

G.f.: 1/(1 - x^3/(1 - x^7/(1 - x^11/(1 - x^15/(1 - x^19/(1 - x^23/( ... ))))))).

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

A227310 G.f.: 1/G(0) where G(k) = 1 + (-q)^(k+1) / (1 - (-q)^(k+1)/G(k+1) ).

Original entry on oeis.org

1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 3, 2, 3, 4, 4, 6, 7, 8, 11, 13, 16, 20, 24, 31, 37, 46, 58, 70, 88, 108, 133, 167, 204, 252, 315, 386, 479, 594, 731, 909, 1122, 1386, 1720, 2124, 2628, 3254, 4022, 4980, 6160, 7618, 9432, 11665, 14433, 17860, 22093, 27341, 33824, 41847, 51785, 64065, 79267
Offset: 0

Views

Author

Joerg Arndt, Jul 06 2013

Keywords

Comments

Number of rough sandpiles: 1-dimensional sandpiles (see A186085) with n grains without flat steps (no two successive parts of the corresponding composition equal), see example. - Joerg Arndt, Mar 08 2014
The sequence of such sandpiles by base length starts (n>=0) 1, 1, 0, 1, 0, 2, 0, 5, 0, 14, 0, 42, 0, ... (A097331, essentially A000108 with interlaced zeros). This is a consequence of the obvious connection to Dyck paths, see example. - Joerg Arndt, Mar 09 2014
a(n>=1) are the Dyck paths with area n between the x-axis and the path which return to the x-axis only once (at their end), whereas A143951 includes paths with intercalated touches of the x-axis. - R. J. Mathar, Aug 22 2018

Examples

			From _Joerg Arndt_, Mar 08 2014: (Start)
The a(21) = 7 rough sandpiles are:
:
:   1:      [ 1 2 1 2 1 2 1 2 1 2 3 2 1 ]  (composition)
:
:           o
:  o o o o ooo
: ooooooooooooo  (rendering of sandpile)
:
:
:   2:      [ 1 2 1 2 1 2 1 2 3 2 1 2 1 ]
:
:         o
:  o o o ooo o
: ooooooooooooo
:
:
:   3:      [ 1 2 1 2 1 2 3 2 1 2 1 2 1 ]
:
:       o
:  o o ooo o o
: ooooooooooooo
:
:
:   4:      [ 1 2 1 2 3 2 1 2 1 2 1 2 1 ]
:
:     o
:  o ooo o o o
: ooooooooooooo
:
:
:   5:      [ 1 2 3 2 1 2 1 2 1 2 1 2 1 ]
:
:   o
:  ooo o o o o
: ooooooooooooo
:
:
:   6:      [ 1 2 3 2 3 4 3 2 1 ]
:
:      o
:   o ooo
:  ooooooo
: ooooooooo
:
:
:   7:      [ 1 2 3 4 3 2 3 2 1 ]
:
:    o
:   ooo o
:  ooooooo
: ooooooooo
(End)
From _Joerg Arndt_, Mar 09 2014: (Start)
The A097331(9) = 14 such sandpiles with base length 9 are:
01:  [ 1 2 1 2 1 2 1 2 1 ]
02:  [ 1 2 1 2 1 2 3 2 1 ]
03:  [ 1 2 1 2 3 2 3 2 1 ]
04:  [ 1 2 1 2 3 2 1 2 1 ]
05:  [ 1 2 1 2 3 4 3 2 1 ]
06:  [ 1 2 3 2 1 2 3 2 1 ]
07:  [ 1 2 3 2 1 2 1 2 1 ]
08:  [ 1 2 3 2 3 2 1 2 1 ]
09:  [ 1 2 3 2 3 2 3 2 1 ]
10:  [ 1 2 3 4 3 2 1 2 1 ]
11:  [ 1 2 3 2 3 4 3 2 1 ]
12:  [ 1 2 3 4 3 2 3 2 1 ]
13:  [ 1 2 3 4 3 4 3 2 1 ]
14:  [ 1 2 3 4 5 4 3 2 1 ]
(End)
		

Crossrefs

Cf. A049346 (g.f.: 1 - 1/G(0), where G(k)= 1 + q^(k+1) / (1 - q^(k+1)/G(k+1) ) ).
Cf. A226728 (g.f.: 1/G(0), where G(k) = 1 + q^(k+1) / (1 - q^(k+1)/G(k+2) ) ).
Cf. A226729 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+1)/G(k+2) ) ).
Cf. A006958 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+1)/G(k+1) ) ).
Cf. A227309 (g.f.: 1/G(0), where G(k) = 1 - q^(k+1) / (1 - q^(k+2)/G(k+1) ) ).

Programs

  • PARI
    N = 66;  q = 'q + O('q^N);
    G(k) = if(k>N, 1, 1 + (-q)^(k+1) / (1 - (-q)^(k+1) / G(k+1) ) );
    gf = 1 / G(0);
    Vec(gf)
    
  • PARI
    N = 66;  q = 'q + O('q^N);
    F(q,y,k) = if(k>N, 1, 1/(1 - y*q^2 * F(q, q^2*y, k+1) ) );
    Vec( 1 + q * F(q,q,0) ) \\ Joerg Arndt, Mar 09 2014

Formula

a(0) = 1 and a(n) = abs(A049346(n)) for n>=1.
G.f.: 1/ (1-q/(1+q/ (1+q^2/(1-q^2/ (1-q^3/(1+q^3/ (1+q^4/(1-q^4/ (1-q^5/(1+q^5/ (1+-...) )) )) )) )) )).
G.f.: 1 + q * F(q,q) where F(q,y) = 1/(1 - y * q^2 * F(q, q^2*y) ); cf. A005169 and p. 841 of the Odlyzko/Wilf reference; 1/(1 - q * F(q,q)) is the g.f. of A143951. - Joerg Arndt, Mar 09 2014
G.f.: 1 + q/(1 - q^3/(1 - q^5/(1 - q^7/ (...)))) (from formulas above). - Joerg Arndt, Mar 09 2014
G.f.: F(x, x^2) where F(x,y) is the g.f. of A239927. - Joerg Arndt, Mar 29 2014
a(n) ~ c * d^n, where d = 1.23729141259673487395949649334678514763130846902468... and c = 0.0773368373684184197215007198148835507944051447907... - Vaclav Kotesovec, Sep 05 2017
G.f.: A(x) = 2 -1/A143951(x). - R. J. Mathar, Aug 23 2018

A129182 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n such that the area between the x-axis and the path is k (n>=0; 0<=k<=n^2).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 3, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 4, 0, 6, 0, 7, 0, 7, 0, 5, 0, 5, 0, 3, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0, 10, 0, 14, 0, 17, 0, 16, 0, 16, 0, 14, 0, 11, 0, 9, 0, 7, 0, 5, 0, 3, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0
Offset: 0

Views

Author

Emeric Deutsch, Apr 08 2007

Keywords

Comments

Row n has n^2 + 1 terms.
Row sums are the Catalan numbers (A000108).
Sum(k*T(n,k), k=0..n^2) = A008549(n).
Sums along falling diagonals give A005169. - Joerg Arndt, Mar 29 2014
T(2n,4n) = A240008(n). - Alois P. Heinz, Mar 30 2014

Examples

			T(4,10) = 3 because we have UDUUUDDD, UUUDDDUD and UUDUDUDD.
Triangle starts:
1;
0,1;
0,0,1,0,1;
0,0,0,1,0,2,0,1,0,1;
0,0,0,0,1,0,3,0,3,0,3,0,2,0,1,0,1;
0,0,0,0,0,1,0,4,0,6,0,7,0,7,0,5,0,5,0,3,0,2,0,1,0,1;
Transposed triangle (A239927) begins:
00:  1;
01:  0, 1;
02:  0, 0, 1;
03:  0, 0, 0, 1;
04:  0, 0, 1, 0, 1;
05:  0, 0, 0, 2, 0, 1;
06:  0, 0, 0, 0, 3, 0, 1;
07:  0, 0, 0, 1, 0, 4, 0, 1;
08:  0, 0, 0, 0, 3, 0, 5, 0, 1;
09:  0, 0, 0, 1, 0, 6, 0, 6, 0, 1;
10:  0, 0, 0, 0, 3, 0, 10, 0, 7, 0, 1;
11:  0, 0, 0, 0, 0, 7, 0, 15, 0, 8, 0, 1;
12:  0, 0, 0, 0, 2, 0, 14, 0, 21, 0, 9, 0, 1;
13:  0, 0, 0, 0, 0, 7, 0, 25, 0, 28, 0, 10, 0, 1;
14:  0, 0, 0, 0, 1, 0, 17, 0, 41, 0, 36, 0, 11, 0, 1;
15:  0, 0, 0, 0, 0, 5, 0, 35, 0, 63, 0, 45, 0, 12, 0, 1;
16:  0, 0, 0, 0, 1, 0, 16, 0, 65, 0, 92, 0, 55, 0, 13, 0, 1;
17:  0, 0, 0, 0, 0, 5, 0, 40, 0, 112, 0, 129, 0, 66, 0, 14, 0, 1;
18:  0, 0, 0, 0, 0, 0, 16, 0, 86, 0, 182, 0, 175, 0, 78, 0, 15, 0, 1;
19:  0, 0, 0, 0, 0, 3, 0, 43, 0, 167, 0, 282, 0, 231, 0, 91, 0, 16, 0, 1;
20:  0, 0, 0, 0, 0, 0, 14, 0, 102, 0, 301, 0, 420, 0, 298, 0, 105, 0, 17, 0, 1;
... - _Joerg Arndt_, Mar 25 2014
		

Crossrefs

Cf. A000108, A008549, A139262, A240008, A143951 (column sums).

Programs

  • Maple
    G:=1/(1-t*z*g[1]): for i from 1 to 11 do g[i]:=1/(1-t^(2*i+1)*z*g[i+1]) od: g[12]:=0: Gser:=simplify(series(G,z=0,11)): for n from 0 to 7 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 0 to 7 do seq(coeff(P[n],t,j),j=0..n^2) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1,
           expand(b(x-1, y-1)*z^(y-1/2)+ b(x-1, y+1)*z^(y+1/2))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Mar 29 2014
  • Mathematica
    b[x_, y_] := b[x, y] = If[y<0 || y>x, 0, If[x==0, 1, Expand[b[x-1, y-1]*z^(y-1/2) + b[x-1, y+1]*z^(y+1/2)]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 24 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) given by G(t,z) = 1+t*z*G(t,t^2*z)*G(t,z).
Sum_{k=0..n^2} (n^2-k)/2 * T(n,k) = A139262(n). - Alois P. Heinz, Mar 31 2018

A129176 Irregular triangle read by rows: T(n,k) is the number of Dyck words of length 2n having k inversions (n >= 0, k >= 0).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Apr 11 2007

Keywords

Comments

A Dyck word of length 2n is a word of n 0's and n 1's for which no initial segment contains more 1's than 0's.
Representing a Dyck word p of length 2n as a superdiagonal Dyck path p', the number of inversions of p is equal to the area between p' and the path that corresponds to the Dyck word 0^n 1^n.
Row n has 1+n(n-1)/2 terms. Row sums are the Catalan numbers (A000108). Alternating row sums for n>=1 are the Catalan numbers alternated with 0's (A097331). Sum(k*T(n,k),k>=0) = A029760(n-2).
This triangle is A129182 (area under Dyck paths), reflected and compressed (0's removed). Equivalently, A239927 rotated by Pi/2 clockwise and compressed.
This is also the number of Catalan paths of length n and area k. - N. J. A. Sloane, Nov 28 2011
From Alford Arnold, Jan 29 2008:
This triangle gives the partial sums of the following triangle A136624:
1
.1
....2...1
........2...3...3...1
............2...2...6...7...6...4...1
................2...2...4...8..12..15..17..14..10...5...1
etc.

Examples

			T(4,5) = 3 because we have 01010011, 01001101 and 00110101.
Triangle starts:
[0] 1;
[1] 1;
[2] 1, 1;
[3] 1, 1, 2, 1;
[4] 1, 1, 2, 3, 3, 3, 1;
[5] 1, 1, 2, 3, 5, 5, 7,  7,  6,  4,  1;
[6] 1, 1, 2, 3, 5, 7, 9, 11, 14, 16, 16, 17, 14, 10, 5, 1;
...
		

Crossrefs

Mirror image of A227543.

Programs

  • Maple
    P[0]:=1: for n from 0 to 8 do
    P[n+1]:=sort(expand(sum(t^((i+1)*(n-i))*P[i]*P[n-i],i=0..n))) od:
    for n from 1 to 9 do seq(coeff(P[n],t,j),j=0..n*(n-1)/2) od;
    # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, 1, expand(b(x-1, y+1, t)*z^t+b(x-1, y-1, t+1))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x == 0, 1, Expand[b[x-1, y+1, t]*z^t + b[x-1, y-1, t+1]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, May 26 2015, after Alois P. Heinz *)
  • 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( Vecrev( 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( Vecrev( P(n) ) ) ); \\ Joerg Arndt, Jan 23 2024
  • SageMath
    from sage.combinat.q_analogues import qt_catalan_number
    for n in (0..9): print(qt_catalan_number(n).substitute(q=1).coefficients())
    # Peter Luschny, Mar 10 2020
    

Formula

The row generating polynomials P[n] = P[n](t) satisfy P[0] = 1 and
P[n+1] = Sum_{i=0..n} P[i] P[n-i] t^((i+1)*(n-i)).

A326453 Triangle read by rows: T(n,k) is the number of small Schröder paths of semilength k such that the area between the path and the x-axis is equal to n (n >= 0; 0 <= k <= n).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 0, 3, 3, 1, 0, 0, 0, 2, 6, 4, 1, 0, 0, 0, 1, 7, 10, 5, 1, 0, 0, 0, 1, 6, 16, 15, 6, 1, 0, 0, 0, 1, 5, 19, 30, 21, 7, 1, 0, 0, 0, 0, 5, 19, 45, 50, 28, 8, 1, 0, 0, 0, 0, 4, 19, 55, 90, 77, 36, 9, 1, 3, 19, 61, 131, 161, 112, 45, 10, 1
Offset: 0

Views

Author

Peter Bala, Jul 06 2019

Keywords

Comments

A239927 is the companion triangle for Dyck paths.
A Schröder path is a lattice path in the plane starting and ending on the x-axis, never going below the x-axis, using the steps (1,1) rise, (1,-1) fall or (2,0) flat. A small Schröder path is a Schröder path with no flat steps on the x-axis.
The area between a small Schröder path and the x-axis may be decomposed into a stack of unit area triangles; the triangles are of two types: up-triangles with vertices at the lattice points (x, y), (x+1, y+1) and (x+2, y) and down-triangles with vertices at the lattice points (x, y), (x-1, y+1) and (x+1, y+1). A small Schröder path of semilength k has k up-triangles in the bottom row of its stack. See the illustration in the Links section for an example. Thus an alternative description of the triangle entry T(n,k) is the number of n triangle stacks, in the sense of A224704, containing k up-triangles in the bottom row.

Examples

			Triangle begins
  n\k|  0    1   2    3    4    5    6    7   8    9
  --------------------------------------------------
   0 |  1
   1 |  0    1
   2 |  0    0   1
   3 |  0    0   1    1
   4 |  0    0   1    2    1
   5 |  0    0   0    3    3    1
   6 |  0    0   0    2    6    4    1
   7 |  0    0   0    1    7   10    5    1
   8 |  0    0   0    1    6   16   15    6   1
   9 |  0    0   0    1    5   19   30   21   7   1
   ...
Example of a stack of 10 up- and down-triangles with 5 up-triangles in the bottom row.
          /\  /\
         /__\/__\     __
        /\  /\  /\  /\  /\
       /__\/__\/__\/__\/__\
		

Crossrefs

Formula

O.g.f. as a continued fraction: A(q,u) = 1/(1 + u - (1 + q)*u/(1 + u - (1 + q^3)*u/(1 + u - (1 + q^5)*u/( (...) )))) = 1 + q*u + q^2*u^2 + q^3*(u^2 + u^3) + q^4*(u^2 + 2*u^3 + u^4) + ...(q marks the area, u marks the up- triangles in the bottom row).
Alternative forms: A(q,u) = 1/(1 - q*u/(1 - q^2*u - q^3*u/(1 - q^4*u/( (...) ))));
A(q,u) = 1/(1 - q*u/(1 - (q^2 + q^3)*u/(1 - q^5*u/(1 - (q^4 + q^7)*u/(1 - q^9*u/(1 - (q^6 + q^11)*u/(1 - q^13*u/( (...) )))))))).
O.g.f. as a ratio of q-series: N(q,u)/D(q,u), where N(q,u) = Sum_{n >= 0} (-1)^n*u^n*q^(2*n^2 + n)/( (1 - q^2)*(1 - q^4)*...*(1 - q^(2*n)) * (1 - u*q^2)*(1 - u*q^4)*...*(1 - u*q^(2*n)) ) and D(q,u) = Sum_{n >= 0} (-1)^n*u^n*q^(2*n^2 - n)/( (1 - q^2)*(1 - q^4)*...*(1 - q^(2*n)) * (1 - u*q^2)*(1 - u*q^4)*...*(1 - u*q^(2*n)) ).

A300953 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area above the path and the area below the path, measured within the smallest enclosing rectangle based on the x-axis; triangle T(n,k), n>=0, -floor((n-1)^2/4) <= k <= floor((n-1)^2/4), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 0, 7, 0, 5, 1, 2, 3, 6, 7, 8, 6, 6, 3, 2, 0, 9, 0, 20, 0, 35, 0, 34, 0, 25, 0, 7, 1, 2, 4, 8, 10, 17, 23, 30, 38, 43, 46, 48, 42, 41, 26, 26, 12, 8, 4, 2, 0, 11, 0, 29, 0, 63, 0, 115, 0, 176, 0, 238, 0, 255, 0, 230, 0, 169, 0, 92, 0, 41, 0, 9
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2018

Keywords

Examples

			              .______.
              | /\/\ |  ,  rectangle area: 12, above path area: 5,
T(3,-1) = 1:  |/____\|  ,  below path area: 7, difference: (5-7) = 2 * (-1).
.
                 /\
                /  \
T(3,0) = 2:    /    \   /\/\/\  .
.
                /\         /\
T(3,1) = 2:    /  \/\   /\/  \  .
.
Triangle T(n,k) begins:
:                                   1                                    ;
:                                   1                                    ;
:                                   2                                    ;
:                               1,  2,  2                                ;
:                           2,  0,  7,  0,  5                            ;
:                   1,  2,  3,  6,  7,  8,  6,  6,  3                    ;
:           2,  0,  9,  0, 20,  0, 35,  0, 34,  0, 25,  0,  7            ;
:  1, 2, 4, 8, 10, 17, 23, 30, 38, 43, 46, 48, 42, 41, 26, 26, 12, 8, 4  ;
		

Crossrefs

Row sums give A000108.
Column k=0 gives A300952.

Formula

Sum_{k = -floor((n-1)^2/4)..floor((n-1)^2/4)} k * T(n,k) = A300996(n).
T(n,-floor((n-1)^2/4)) = A040001(n).
T(n, floor((n-1)^2/4)) = A026741(n+1) for n > 2.
T(n,k) = 0 iff n is even and k is odd or abs(k) > floor(n*(n-1)/6).

A240008 Number of Dyck paths of semilength 2n such that the area between the x-axis and the path is 4n.

Original entry on oeis.org

1, 1, 3, 14, 65, 301, 1419, 6786, 32749, 159108, 777224, 3813745, 18783934, 92811389, 459832745, 2283628771, 11364500644, 56659024320, 282939657220, 1414980598167, 7085590965083, 35523567248527, 178289298823240, 895697952270827, 4503912366189604
Offset: 0

Views

Author

Alois P. Heinz, Mar 30 2014

Keywords

Programs

  • Maple
    b:= proc(x, y, k) option remember;
          `if`(y<0 or y>x or k<0 or k>x^2/2-(y-x)^2/4, 0,
          `if`(x=0, 1, b(x-1, y-1, k-y+1/2) +b(x-1, y+1, k-y-1/2)))
        end:
    a:= n-> b(4*n, 0, 4*n):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_, k_] := b[x, y, k] = If[y<0 || y>x || k<0 || k>x^2/2-(y-x)^2/4, 0, If[x==0, 1, b[x-1, y-1, k-y+1/2] + b[x-1, y+1, k-y-1/2]]];
    a[n_] := b[4n, 0, 4n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 01 2017, translated from Maple *)

Formula

a(n) = A129182(2n,4n) = A239927(4n,2n).
a(n) ~ c * d^n / sqrt(n), where d = 5.134082940807122222912767966569622... and c = 0.198313337349936555418443931967... - Vaclav Kotesovec, Apr 01 2014

A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 3, 6, 3, 1, 2, 5, 8, 12, 8, 5, 2, 1, 4, 9, 16, 22, 28, 22, 16, 9, 4, 1, 1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1, 2, 7, 15, 31, 53, 82, 114, 147, 171, 186, 171, 147, 114, 82, 53, 31, 15, 7, 2, 1, 5, 13, 30, 56, 95, 150, 216, 293, 371, 445, 495, 522, 495, 445, 371, 293, 216, 150, 95, 56, 30, 13, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			               /\
T(3,-1) = 1:  /  \/\
.
                /\
               /  \     /\/\
T(3,0) = 3:   /    \   /    \   /\/\/\
.
                 /\
T(3,1) = 1:   /\/  \
.
Triangle T(n,k) begins:
:                             1                            ;
:                             1                            ;
:                             2                            ;
:                         1,  3,  1                        ;
:                     1,  3,  6,  3,  1                    ;
:                 2,  5,  8, 12,  8,  5,  2                ;
:         1,  4,  9, 16, 22, 28, 22, 16,  9,  4,  1        ;
:  1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1  ;
		

Crossrefs

Row sums give A000108.
Column k=0 gives A300323.

Programs

  • Maple
    b:= proc(x, y, v) option remember; expand(
         `if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
          b(x-1, y+i, v+j)*z^((y-v)/2+(i-j)/4), i=l), j=l))([-1, 1]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=ldegree(p)..degree(p)))(
                 add(b(n, (n-2*j)$2), j=0..n/2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[b[x - 1, y + i, v + j] z^((y - v)/2 + (i - j)/4), {i, l}], {j, l}]][{-1, 1}]]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Range[Exponent[p, z, Reverse @@ # &], Exponent[p, z]]}]][Sum[b[n, n-2j, n-2j], {j, 0, n/2}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

T(n,k) = T(n,-k).
T(n,A130518(n)) = A177702(n).

A300323 Number of Dyck paths of semilength n such that the area under the right half of the path equals the area under the left half of the path.

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 28, 69, 186, 522, 1536, 4638, 14408, 45568, 146884, 479871, 1589516, 5320854, 18000198, 61412376, 211282386, 731973720, 2553168136, 8957554412, 31604599044, 112060048354, 399227283950, 1428315878002, 5130964125124, 18499652813682
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			              /\
             /  \      /\/\
a(3) = 3:   /    \    /    \    /\/\/\ .
.
a(5) = 12 counts A001405(5) = 10 symmetric plus 2 non-symmetric Dyck paths:
             /\  /\
          /\/  \/  \  and its reversal.
		

Crossrefs

Column k=0 of A300322.
Cf. A000108 (all Dyck paths), A000225, A001405 (symmetric Dyck paths), A129182, A239927, A298645.

Programs

  • Maple
    b:= proc(x, y) option remember; expand(`if`(x=0, 1,
          `if`(y<1,   0, b(x-1, y-1)*z^(2*y-1))+
          `if`(x add(coeff(p, z, i)^2
          , i=0..degree(p)))(b(n, n-2*j)), j=0..n/2)
        end:
    seq(a(n), n=0..32);
  • Mathematica
    b[x_, y_] := b[x, y] = Expand[If[x == 0, 1, If[y < 1, 0, b[x - 1, y - 1] z^(2y - 1)] + If[x < y + 2, 0, b[x - 1, y + 1] z^(2y + 1)]]];
    a[n_] := a[n] = Sum[Function[p, Sum[Coefficient[p, z, i]^2, {i, 0, Exponent[p, z]}]][b[n, n - 2j]], {j, 0, n/2}];
    Table[a[n], {n, 0, 32}] (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

a(n) >= A001405(n) with equality only for n <= 4.
a(n) is odd <=> n in { A000225 }.
Showing 1-10 of 10 results.