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 20 results. Next

A237596 Convolution triangle of A000958(n+1).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 8, 7, 3, 1, 24, 22, 12, 4, 1, 75, 73, 43, 18, 5, 1, 243, 246, 156, 72, 25, 6, 1, 808, 844, 564, 283, 110, 33, 7, 1, 2742, 2936, 2046, 1092, 465, 158, 42, 8, 1, 9458, 10334, 7449, 4178, 1906, 714, 217, 52, 9, 1, 33062, 36736, 27231, 15904, 7670, 3096, 1043, 288, 63, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 09 2014

Keywords

Comments

Riordan array (f(x)/x, f(x)) where f(x) is the g.f. of A000958.
Reversal of A236918.
Row sums are A109262(n+1).
Diagonal sums are A033297(n+2).

Examples

			Triangle begins:
    1;
    1,   1;
    3,   2,   1;
    8,   7,   3,   1;
   24,  22,  12,   4,   1;
   75,  73,  43,  18,   5,  1;
  243, 246, 156,  72,  25,  6, 1;
  808, 844, 564, 283, 110, 33, 7, 1;
  ...
		

Crossrefs

Columns give A000958, A114495.
Cf. A033297 (diagonal sums), A109262 (row sums), A236918 (row reversal).

Programs

  • Maple
    # Uses function PMatrix from A357368. Adds column 1,0,0,0,... to the left.
    PMatrix(10, n -> A000958(n)); # Peter Luschny, Oct 19 2022
  • Mathematica
    P[n_, x_]:= P[n, x]= If[n==0, 1, Sum[(j/(2*n-j))*Binomial[2*n-j, n-j]*Fibonacci[j, x], {j,0,n}]];
    T[n_, k_] := Coefficient[P[n+1, x], x, k];
    Table[T[n, k], {n,0,13}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 14 2022 *)
  • SageMath
    def f(n,x): return sum( binomial(n-j-1, j)*x^(n-2*j-1) for j in (0..(n-1)//2) )
    def p(n,x):
        if (n==0): return 1
        else: return sum( (j/(2*n-j))*binomial(2*n-j, n-j)*f(j, x) for j in (0..n) )
    def A237596(n,k): return ( p(n+1,x) ).series(x, n+1).list()[k]
    flatten([[A237596(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 14 2022

Formula

G.f. for the column k-1: ((1-sqrt(1-4*x))^k/(1+sqrt(1-4*x) + 2*x)^k)/x.
Sum_{k=0..n} T(n,k) = A109262(n+1).
From G. C. Greubel, Jun 14 2022: (Start)
T(n, k) = coefficient of [x^k]( p(n+1, x) ), where p(n, x) = Sum_{j=0..n} (j/(2*n-j))*binomial(2*n-j, n-j)*Fibonacci(j, x) with p(0, x) = 1 and Fibonacci(n, x) are the Fibonacci polynomials.
T(n, k) = A236918(n, n-k). (End)

A039599 Triangle formed from even-numbered columns of triangle of expansions of powers of x in terms of Chebyshev polynomials U_n(x).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 5, 9, 5, 1, 14, 28, 20, 7, 1, 42, 90, 75, 35, 9, 1, 132, 297, 275, 154, 54, 11, 1, 429, 1001, 1001, 637, 273, 77, 13, 1, 1430, 3432, 3640, 2548, 1260, 440, 104, 15, 1, 4862, 11934, 13260, 9996, 5508, 2244, 663, 135, 17, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,n) with steps E = (1,0) and N = (0,1) which touch but do not cross the line x - y = k and only situated above this line; example: T(3,2) = 5 because we have EENNNE, EENNEN, EENENN, ENEENN, NEEENN. - Philippe Deléham, May 23 2005
The matrix inverse of this triangle is the triangular matrix T(n,k) = (-1)^(n+k)* A085478(n,k). - Philippe Deléham, May 26 2005
Essentially the same as A050155 except with a leading diagonal A000108 (Catalan numbers) 1, 1, 2, 5, 14, 42, 132, 429, .... - Philippe Deléham, May 31 2005
Number of Grand Dyck paths of semilength n and having k downward returns to the x-axis. (A Grand Dyck path of semilength n is a path in the half-plane x>=0, starting at (0,0), ending at (2n,0) and consisting of steps u=(1,1) and d=(1,-1)). Example: T(3,2)=5 because we have u(d)uud(d),uud(d)u(d),u(d)u(d)du,u(d)duu(d) and duu(d)u(d) (the downward returns to the x-axis are shown between parentheses). - Emeric Deutsch, May 06 2006
Riordan array (c(x),x*c(x)^2) where c(x) is the g.f. of A000108; inverse array is (1/(1+x),x/(1+x)^2). - Philippe Deléham, Feb 12 2007
The triangle may also be generated from M^n*[1,0,0,0,0,0,0,0,...], where M is the infinite tridiagonal matrix with all 1's in the super and subdiagonals and [1,2,2,2,2,2,2,...] in the main diagonal. - Philippe Deléham, Feb 26 2007
Inverse binomial matrix applied to A124733. Binomial matrix applied to A089942. - Philippe Deléham, Feb 26 2007
Number of standard tableaux of shape (n+k,n-k). - Philippe Deléham, Mar 22 2007
From Philippe Deléham, Mar 30 2007: (Start)
This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0)=x*T(n-1,0)+T(n-1,1), T(n,k)=T(n-1,k-1)+y*T(n-1,k)+T(n-1,k+1) for k>=1. Other triangles arise by choosing different values for (x,y):
(0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970
(1,0) -> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877;
(1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598;
(2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954;
(3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791;
(4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. (End)
The table U(n,k) = Sum_{j=0..n} T(n,j)*k^j is given in A098474. - Philippe Deléham, Mar 29 2007
Sequence read mod 2 gives A127872. - Philippe Deléham, Apr 12 2007
Number of 2n step walks from (0,0) to (2n,2k) and consisting of step u=(1,1) and d=(1,-1) and the path stays in the nonnegative quadrant. Example: T(3,0)=5 because we have uuuddd, uududd, ududud, uduudd, uuddud; T(3,1)=9 because we have uuuudd, uuuddu, uuudud, ududuu, uuduud, uduudu, uudduu, uduuud, uududu; T(3,2)=5 because we have uuuuud, uuuudu, uuuduu, uuduuu, uduuuu; T(3,3)=1 because we have uuuuuu. - Philippe Deléham, Apr 16 2007, Apr 17 2007, Apr 18 2007
Triangular matrix, read by rows, equal to the matrix inverse of triangle A129818. - Philippe Deléham, Jun 19 2007
Let Sum_{n>=0} a(n)*x^n = (1+x)/(1-mx+x^2) = o.g.f. of A_m, then Sum_{k=0..n} T(n,k)*a(k) = (m+2)^n. Related expansions of A_m are: A099493, A033999, A057078, A057077, A057079, A005408, A002878, A001834, A030221, A002315, A033890, A057080, A057081, A054320, A097783, A077416, A126866, A028230, A161591, for m=-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, respectively. - Philippe Deléham, Nov 16 2009
The Kn11, Kn12, Fi1 and Fi2 triangle sums link the triangle given above with three sequences; see the crossrefs. For the definitions of these triangle sums, see A180662. - Johannes W. Meijer, Apr 20 2011
4^n = (n-th row terms) dot (first n+1 odd integer terms). Example: 4^4 = 256 = (14, 28, 20, 7, 1) dot (1, 3, 5, 7, 9) = (14 + 84 + 100 + 49 + 9) = 256. - Gary W. Adamson, Jun 13 2011
The linear system of n equations with coefficients defined by the first n rows solve for diagonal lengths of regular polygons with N= 2n+1 edges; the constants c^0, c^1, c^2, ... are on the right hand side, where c = 2 + 2*cos(2*Pi/N). Example: take the first 4 rows relating to the 9-gon (nonagon), N = 2*4 + 1; with c = 2 + 2*cos(2*Pi/9) = 3.5320888.... The equations are (1,0,0,0) = 1; (1,1,0,0) = c; (2,3,1,0) = c^2; (5,9,5,1) = c^3. The solutions are 1, 2.53208..., 2.87938..., and 1.87938...; the four distinct diagonal lengths of the 9-gon (nonagon) with edge = 1. (Cf. comment in A089942 which uses the analogous operations but with c = 1 + 2*cos(2*Pi/9).) - Gary W. Adamson, Sep 21 2011
Also called the Lobb numbers, after Andrew Lobb, are a natural generalization of the Catalan numbers, given by L(m,n)=(2m+1)*Binomial(2n,m+n)/(m+n+1), where n >= m >= 0. For m=0, we get the n-th Catalan number. See added reference. - Jayanta Basu, Apr 30 2013
From Wolfdieter Lang, Sep 20 2013: (Start)
T(n, k) = A053121(2*n, 2*k). T(n, k) appears in the formula for the (2*n)-th power of the algebraic number rho(N):= 2*cos(Pi/N) = R(N, 2) in terms of the odd-indexed diagonal/side length ratios R(N, 2*k+1) = S(2*k, rho(N)) in the regular N-gon inscribed in the unit circle (length unit 1). S(n, x) are Chebyshev's S polynomials (see A049310):
rho(N)^(2*n) = Sum_{k=0..n} T(n, k)*R(N, 2*k+1), n >= 0, identical in N > = 1. For a proof see the Sep 21 2013 comment under A053121. Note that this is the unreduced version if R(N, j) with j > delta(N), the degree of the algebraic number rho(N) (see A055034), appears.
For the odd powers of rho(n) see A039598. (End)
Unsigned coefficients of polynomial numerators of Eqn. 2.1 of the Chakravarty and Kodama paper, defining the polynomials of A067311. - Tom Copeland, May 26 2016
The triangle is the Riordan square of the Catalan numbers in the sense of A321620. - Peter Luschny, Feb 14 2023

Examples

			Triangle T(n, k) begins:
  n\k     0     1     2     3     4     5    6   7   8  9
  0:      1
  1:      1     1
  2:      2     3     1
  3:      5     9     5     1
  4:     14    28    20     7     1
  5:     42    90    75    35     9     1
  6:    132   297   275   154    54    11    1
  7:    429  1001  1001   637   273    77   13   1
  8:   1430  3432  3640  2548  1260   440  104  15   1
  9:   4862 11934 13260  9996  5508  2244  663 135  17  1
  ... Reformatted by _Wolfdieter Lang_, Dec 21 2015
From _Paul Barry_, Feb 17 2011: (Start)
Production matrix begins
  1, 1,
  1, 2, 1,
  0, 1, 2, 1,
  0, 0, 1, 2, 1,
  0, 0, 0, 1, 2, 1,
  0, 0, 0, 0, 1, 2, 1,
  0, 0, 0, 0, 0, 1, 2, 1 (End)
From _Wolfdieter Lang_, Sep 20 2013: (Start)
Example for rho(N) = 2*cos(Pi/N) powers:
n=2: rho(N)^4 = 2*R(N,1) + 3*R(N,3) + 1*R(N, 5) =
  2 + 3*S(2, rho(N)) + 1*S(4, rho(N)), identical in N >= 1. For N=4 (the square with only one distinct diagonal), the degree delta(4) = 2, hence R(4, 3) and R(4, 5) can be reduced, namely to R(4, 1) = 1 and R(4, 5) = -R(4,1) = -1, respectively. Therefore, rho(4)^4 =(2*cos(Pi/4))^4 = 2 + 3 -1 = 4. (End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
  • T. Myers and L. Shapiro, Some applications of the sequence 1, 5, 22, 93, 386, ... to Dyck paths and ordered trees, Congressus Numerant., 204 (2010), 93-104.

Crossrefs

Row sums: A000984.
Triangle sums (see the comments): A000958 (Kn11), A001558 (Kn12), A088218 (Fi1, Fi2).

Programs

  • Magma
    /* As triangle */ [[Binomial(2*n, k+n)*(2*k+1)/(k+n+1): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Oct 16 2015
    
  • Maple
    T:=(n,k)->(2*k+1)*binomial(2*n,n-k)/(n+k+1): for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form # Emeric Deutsch, May 06 2006
    T := proc(n, k) option remember; if k = n then 1 elif k > n then 0 elif k = 0 then T(n-1, 0) + T(n-1,1) else T(n-1, k-1) + 2*T(n-1, k) + T(n-1, k+1) fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..9) od; # Peter Luschny, Feb 14 2023
  • Mathematica
    Table[Abs[Differences[Table[Binomial[2 n, n + i], {i, 0, n + 1}]]], {n, 0,7}] // Flatten (* Geoffrey Critzer, Dec 18 2011 *)
    Join[{1},Flatten[Table[Binomial[2n-1,n-k]-Binomial[2n-1,n-k-2],{n,10},{k,0,n}]]] (* Harvey P. Dale, Dec 18 2011 *)
    Flatten[Table[Binomial[2*n,m+n]*(2*m+1)/(m+n+1),{n,0,9},{m,0,n}]] (* Jayanta Basu, Apr 30 2013 *)
  • PARI
    a(n, k) = (2*n+1)/(n+k+1)*binomial(2*k, n+k)
    trianglerows(n) = for(x=0, n-1, for(y=0, x, print1(a(y, x), ", ")); print(""))
    trianglerows(10) \\ Felix Fröhlich, Jun 24 2016
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of the triangle
    def A039599_triangle(n) :
        D = [0]*(n+2); D[1] = 1
        b = True ; h = 1
        for i in range(2*n-1) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1
            else :
                for k in range(1,h, 1) : D[k] += D[k+1]
            if b : print([D[z] for z in (1..h-1)])
            b = not b
    A039599_triangle(10)  # Peter Luschny, May 01 2012
    

Formula

T(n,k) = C(2*n-1, n-k) - C(2*n-1, n-k-2), n >= 1, T(0,0) = 1.
From Emeric Deutsch, May 06 2006: (Start)
T(n,k) = (2*k+1)*binomial(2*n,n-k)/(n+k+1).
G.f.: G(t,z)=1/(1-(1+t)*z*C), where C=(1-sqrt(1-4*z))/(2*z) is the Catalan function. (End)
The following formulas were added by Philippe Deléham during 2003 to 2009: (Start)
Triangle T(n, k) read by rows; given by A000012 DELTA A000007, where DELTA is Deléham's operator defined in A084938.
T(n, k) = C(2*n, n-k)*(2*k+1)/(n+k+1). Sum(k>=0; T(n, k)*T(m, k) = A000108(n+m)); A000108: numbers of Catalan.
T(n, 0) = A000108(n); T(n, k) = 0 if k>n; for k>0, T(n, k) = Sum_{j=1..n} T(n-j, k-1)*A000108(j).
T(n, k) = A009766(n+k, n-k) = A033184(n+k+1, 2k+1).
G.f. for column k: Sum_{n>=0} T(n, k)*x^n = x^k*C(x)^(2*k+1) where C(x) = Sum_{n>=0} A000108(n)*x^n is g.f. for Catalan numbers, A000108.
T(0, 0) = 1, T(n, k) = 0 if n<0 or n=1, T(n, k) = T(n-1, k-1) + 2*T(n-1, k) + T(n-1, k+1).
a(n) + a(n+1) = 1 + A000108(m+1) if n = m*(m+3)/2; a(n) + a(n+1) = A039598(n) otherwise.
T(n, k) = A050165(n, n-k).
Sum_{j>=0} T(n-k, j)*A039598(k, j) = A028364(n, k).
Matrix inverse of the triangle T(n, k) = (-1)^(n+k)*binomial(n+k, 2*k) = (-1)^(n+k)*A085478(n, k).
Sum_{k=0..n} T(n, k)*x^k = A000108(n), A000984(n), A007854(n), A076035(n), A076036(n) for x = 0, 1, 2, 3, 4.
Sum_{k=0..n} (2*k+1)*T(n, k) = 4^n.
T(n, k)*(-2)^(n-k) = A114193(n, k).
Sum_{k>=h} T(n,k) = binomial(2n,n-h).
Sum_{k=0..n} T(n,k)*5^k = A127628(n).
Sum_{k=0..n} T(n,k)*7^k = A115970(n).
T(n,k) = Sum_{j=0..n-k} A106566(n+k,2*k+j).
Sum_{k=0..n} T(n,k)*6^k = A126694(n).
Sum_{k=0..n} T(n,k)*A000108(k) = A007852(n+1).
Sum_{k=0..floor(n/2)} T(n-k,k) = A000958(n+1).
Sum_{k=0..n} T(n,k)*(-1)^k = A000007(n).
Sum_{k=0..n} T(n,k)*(-2)^k = (-1)^n*A064310(n).
T(2*n,n) = A126596(n).
Sum_{k=0..n} T(n,k)*(-x)^k = A000007(n), A126983(n), A126984(n), A126982(n), A126986(n), A126987(n), A127017(n), A127016(n), A126985(n), A127053(n) for x=1,2,3,4,5,6,7,8,9,10 respectively.
Sum_{j>=0} T(n,j)*binomial(j,k) = A116395(n,k).
T(n,k) = Sum_{j>=0} A106566(n,j)*binomial(j,k).
T(n,k) = Sum_{j>=0} A127543(n,j)*A038207(j,k).
Sum_{k=0..floor(n/2)} T(n-k,k)*A000108(k) = A101490(n+1).
T(n,k) = A053121(2*n,2*k).
Sum_{k=0..n} T(n,k)*sin((2*k+1)*x) = sin(x)*(2*cos(x))^(2*n).
T(n,n-k) = Sum_{j>=0} (-1)^(n-j)*A094385(n,j)*binomial(j,k).
Sum_{j>=0} A110506(n,j)*binomial(j,k) = Sum_{j>=0} A110510(n,j)*A038207(j,k) = T(n,k)*2^(n-k).
Sum_{j>=0} A110518(n,j)*A027465(j,k) = Sum_{j>=0} A110519(n,j)*A038207(j,k) = T(n,k)*3^(n-k).
Sum_{k=0..n} T(n,k)*A001045(k) = A049027(n), for n>=1.
Sum_{k=0..n} T(n,k)*a(k) = (m+2)^n if Sum_{k>=0} a(k)*x^k = (1+x)/(x^2-m*x+1).
Sum_{k=0..n} T(n,k)*A040000(k) = A001700(n).
Sum_{k=0..n} T(n,k)*A122553(k) = A051924(n+1).
Sum_{k=0..n} T(n,k)*A123932(k) = A051944(n).
Sum_{k=0..n} T(n,k)*k^2 = A000531(n), for n>=1.
Sum_{k=0..n} T(n,k)*A000217(k) = A002457(n-1), for n>=1.
Sum{j>=0} binomial(n,j)*T(j,k)= A124733(n,k).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A000984(n), A089022(n), A035610(n), A130976(n), A130977(n), A130978(n), A130979(n), A130980(n), A131521(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively.
Sum_{k=0..n} T(n,k)*A005043(k) = A127632(n).
Sum_{k=0..n} T(n,k)*A132262(k) = A089022(n).
T(n,k) + T(n,k+1) = A039598(n,k).
T(n,k) = A128899(n,k)+A128899(n,k+1).
Sum_{k=0..n} T(n,k)*A015518(k) = A076025(n), for n>=1. Also Sum_{k=0..n} T(n,k)*A015521(k) = A076026(n), for n>=1.
Sum_{k=0..n} T(n,k)*(-1)^k*x^(n-k) = A033999(n), A000007(n), A064062(n), A110520(n), A132863(n), A132864(n), A132865(n), A132866(n), A132867(n), A132869(n), A132897(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*(-1)^(k+1)*A000045(k) = A109262(n), A000045:= Fibonacci numbers.
Sum_{k=0..n} T(n,k)*A000035(k)*A016116(k) = A143464(n).
Sum_{k=0..n} T(n,k)*A016116(k) = A101850(n).
Sum_{k=0..n} T(n,k)*A010684(k) = A100320(n).
Sum_{k=0..n} T(n,k)*A000034(k) = A029651(n).
Sum_{k=0..n} T(n,k)*A010686(k) = A144706(n).
Sum_{k=0..n} T(n,k)*A006130(k-1) = A143646(n), with A006130(-1)=0.
T(n,2*k)+T(n,2*k+1) = A118919(n,k).
Sum_{k=0..j} T(n,k) = A050157(n,j).
Sum_{k=0..2} T(n,k) = A026012(n); Sum_{k=0..3} T(n,k)=A026029(n).
Sum_{k=0..n} T(n,k)*A000045(k+2) = A026671(n).
Sum_{k=0..n} T(n,k)*A000045(k+1) = A026726(n).
Sum_{k=0..n} T(n,k)*A057078(k) = A000012(n).
Sum_{k=0..n} T(n,k)*A108411(k) = A155084(n).
Sum_{k=0..n} T(n,k)*A057077(k) = 2^n = A000079(n).
Sum_{k=0..n} T(n,k)*A057079(k) = 3^n = A000244(n).
Sum_{k=0..n} T(n,k)*(-1)^k*A011782(k) = A000957(n+1).
(End)
T(n,k) = Sum_{j=0..k} binomial(k+j,2j)*(-1)^(k-j)*A000108(n+j). - Paul Barry, Feb 17 2011
Sum_{k=0..n} T(n,k)*A071679(k+1) = A026674(n+1). - Philippe Deléham, Feb 01 2014
Sum_{k=0..n} T(n,k)*(2*k+1)^2 = (4*n+1)*binomial(2*n,n). - Werner Schulte, Jul 22 2015
Sum_{k=0..n} T(n,k)*(2*k+1)^3 = (6*n+1)*4^n. - Werner Schulte, Jul 22 2015
Sum_{k=0..n} (-1)^k*T(n,k)*(2*k+1)^(2*m) = 0 for 0 <= m < n (see also A160562). - Werner Schulte, Dec 03 2015
T(n,k) = GegenbauerC(n-k,-n+1,-1) - GegenbauerC(n-k-1,-n+1,-1). - Peter Luschny, May 13 2016
T(n,n-2) = A014107(n). - R. J. Mathar, Jan 30 2019
T(n,n-3) = n*(2*n-1)*(2*n-5)/3. - R. J. Mathar, Jan 30 2019
T(n,n-4) = n*(n-1)*(2*n-1)*(2*n-7)/6. - R. J. Mathar, Jan 30 2019
T(n,n-5) = n*(n-1)*(2*n-1)*(2*n-3)*(2*n-9)/30. - R. J. Mathar, Jan 30 2019

Extensions

Corrected by Philippe Deléham, Nov 26 2009, Dec 14 2009

A009766 Catalan's triangle T(n,k) (read by rows): each term is the sum of the entries above and to the left, i.e., T(n,k) = Sum_{j=0..k} T(n-1,j).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 5, 1, 4, 9, 14, 14, 1, 5, 14, 28, 42, 42, 1, 6, 20, 48, 90, 132, 132, 1, 7, 27, 75, 165, 297, 429, 429, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862, 1, 10, 54, 208, 637, 1638, 3640, 7072, 11934
Offset: 0

Views

Author

Keywords

Comments

The entries in this triangle (in its many forms) are often called ballot numbers.
T(n,k) = number of standard tableaux of shape (n,k) (n > 0, 0 <= k <= n). Example: T(3,1) = 3 because we have 134/2, 124/3 and 123/4. - Emeric Deutsch, May 18 2004
T(n,k) is the number of full binary trees with n+1 internal nodes and jump-length k. In the preorder traversal of a full binary tree, any transition from a node at a deeper level to a node on a strictly higher level is called a jump; the positive difference of the levels is called the jump distance; the sum of the jump distances in a given ordered tree is called the jump-length. - Emeric Deutsch, Jan 18 2007
The k-th diagonal from the right (k=1, 2, ...) gives the sequence obtained by asking in how many ways can we toss a fair coin until we first get k more heads than tails. The k-th diagonal has formula k(2m+k-1)!/(m!(m+k)!) and g.f. (C(x))^k where C(x) is the generating function for the Catalan numbers, (1-sqrt(1-4*x))/(2*x). - Anthony C Robin, Jul 12 2007
T(n,k) is also the number of order-decreasing and order-preserving full transformations (of an n-element chain) of waist k (waist (alpha) = max(Im(alpha))). - Abdullahi Umar, Aug 25 2008
Formatted as an upper right triangle (see tables) a(c,r) is the number of different triangulated planar polygons with c+2 vertices, with triangle degree c-r+1 for the same vertex X (c=column number, r=row number, with c >= r >= 1). - Patrick Labarque, Jul 28 2010
The triangle sums, see A180662 for their definitions, link Catalan's triangle, its mirror is A033184, with several sequences, see crossrefs. - Johannes W. Meijer, Sep 22 2010
The m-th row of Catalan's triangle consists of the unique nonnegative differences of the form binomial(m+k,m)-binomial(m+k,m+1) with 0 <= k <= m (See Links). - R. J. Cano, Jul 22 2014
T(n,k) is also the number of nondecreasing parking functions of length n+1 whose maximum element is k+1. For example T(3,2) = 5 because we have (1,1,1,3), (1,1,2,3), (1,2,2,3), (1,1,3,3), (1,2,3,3). - Ran Pan, Nov 16 2015
T(n,k) is the number of Dyck paths from (0,0) to (n+2,n+2) which start with n-k+2 east steps and touch the diagonal y=x only on the last north step. - Felipe Rueda, Sep 18 2019
T(n-1,k) for k < n is number of well-formed strings of n parenthesis pairs with prefix of exactly n-k opening parenthesis; T(n,n) = T(n,n-1). - Hermann Stamm-Wilbrandt, May 02 2021

Examples

			Triangle begins in row n=0 with 0 <= k <= n:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  5,   5;
  1, 4,  9,  14,  14;
  1, 5, 14,  28,  42,   42;
  1, 6, 20,  48,  90,  132,  132;
  1, 7, 27,  75, 165,  297,  429,  429;
  1, 8, 35, 110, 275,  572, 1001, 1430, 1430;
  1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 4862;
		

References

  • William Feller, Introduction to Probability Theory and its Applications, vol. I, ed. 2, chap. 3, sect. 1,2.
  • Ki Hang Kim, Douglas G. Rogers, and Fred W. Roush, Similarity relations and semiorders. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 577-594, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561081 (81i:05013).
  • D. E. Knuth, TAOCP, Vol. 4, Section 7.2.1.6, Eq. 22, p. 451.
  • C. Krishnamachary and M. Bheemasena Rao, Determinants whose elements are Eulerian, prepared Bernoullian and other numbers, J. Indian Math. Soc., 14 (1922), 55-62, 122-138 and 143-146.
  • M. Bellon, Query 5467, L'Intermédiaire des Mathématiciens, 4 (1925), 11; H. Ory, 4 (1925), 120. - N. J. A. Sloane, Mar 09 2022
  • Andrzej Proskurowski and Ekaputra Laiman, Fast enumeration, ranking, and unranking of binary trees. Proceedings of the thirteenth Southeastern conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1982). Congr. Numer. 35 (1982), 401-413.MR0725898 (85a:68152).
  • M. Welsch, Note #371, L'Intermédiaire des Mathématiciens, 2 (1895), pp. 235-237. - N. J. A. Sloane, Mar 02 2022

Crossrefs

The following are all versions of (essentially) the same Catalan triangle: A009766, A008315, A028364, A030237, A047072, A053121, A059365, A062103, A099039, A106566, A130020, A140344.
Sums of the shallow diagonals give A001405, central binomial coefficients: 1=1, 1=1, 1+1=2, 1+2=3, 1+3+2=6, 1+4+5=10, 1+5+9+5=20, ...
Row sums as well as the sums of the squares of the shallow diagonals give Catalan numbers (A000108).
Reflected version of A033184.
Triangle sums (see the comments): A000108 (Row1), A000957 (Row2), A001405 (Kn11), A014495 (Kn12), A194124 (Kn13), A030238 (Kn21), A000984 (Kn4), A000958 (Fi2), A165407 (Ca1), A026726 (Ca4), A081696 (Ze2).

Programs

  • GAP
    Flat(List([0..10],n->List([0..n],m->Binomial(n+m,n)*(n-m+1)/(n+1)))); # Muniru A Asiru, Feb 18 2018
    
  • Haskell
    a009766 n k = a009766_tabl !! n !! k
    a009766_row n = a009766_tabl !! n
    a009766_tabl = iterate (\row -> scanl1 (+) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    [[Binomial(n+k,n)*(n-k+1)/(n+1): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Mar 07 2019
    
  • Maple
    A009766 := proc(n,k) binomial(n+k,n)*(n-k+1)/(n+1); end proc:
    seq(seq(A009766(n,k), k=0..n), n=0..10); # R. J. Mathar, Dec 03 2010
  • Mathematica
    Flatten[NestList[Append[Accumulate[#], Last[Accumulate[#]]] &, {1}, 9]] (* Birkas Gyorgy, May 19 2012 *)
    T[n_, k_] := T[n, k] = Which[k == 0, 1, k>n, 0, True, T[n-1, k] + T[n, k-1] ]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2016 *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, binomial(n+1+k, k) * (n+1-k) / (n+1+k) )}; /* Michael Somos, Oct 17 2006 */
    
  • PARI
    b009766=(n1=0,n2=100)->{my(q=if(!n1,0,binomial(n1+1,2)));for(w=n1,n2,for(k=0,w,write("b009766.txt",1*q" "1*(binomial(w+k,w)-binomial(w+k,w+1)));q++))} \\ R. J. Cano, Jul 22 2014
    
  • Python
    from math import comb, isqrt
    def A009766(n): return comb((a:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))+(b:=n-comb(a+1,2)),b)*(a-b+1)//(a+1) # Chai Wah Wu, Nov 12 2024
  • Sage
    @CachedFunction
    def ballot(p,q):
        if p == 0 and q == 0: return 1
        if p < 0 or p > q: return 0
        S = ballot(p-2, q) + ballot(p, q-2)
        if q % 2 == 1: S += ballot(p-1, q-1)
        return S
    A009766 = lambda n, k: ballot(2*k, 2*n)
    for n in (0..7): [A009766(n, k) for k in (0..n)]  # Peter Luschny, Mar 05 2014
    
  • Sage
    [[binomial(n+k,n)*(n-k+1)/(n+1) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 07 2019
    

Formula

T(n, m) = binomial(n+m, n)*(n-m+1)/(n+1), 0 <= m <= n.
G.f. for column m: (x^m)*N(2; m-1, x)/(1-x)^(m+1), m >= 0, with the row polynomials from triangle A062991 and N(2; -1, x) := 1.
G.f.: C(t*x)/(1-x*C(t*x)) = 1 + (1+t)*x + (1+2*t+2*t^2)*x^2 + ..., where C(x) = (1-sqrt(1-4*x))/(2*x) is the Catalan function. - Emeric Deutsch, May 18 2004
Another version of triangle T(n, k) given by [1, 0, 0, 0, 0, 0, ...] DELTA [0, 1, 1, 1, 1, 1, 1, ...] = 1; 1, 0; 1, 1, 0; 1, 2, 2, 0; 1, 3, 5, 5, 0; 1, 4, 9, 14, 14, 0; ... where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 16 2005
O.g.f. (with offset 1) is the series reversion of x*(1+x*(1-t))/(1+x)^2 = x - x^2*(1+t) + x^3*(1+2*t) - x^4*(1+3*t) + ... . - Peter Bala, Jul 15 2012
Sum_{k=0..floor(n/2)} T(n-k+p-1, k+p-1) = A001405(n+2*p-2) - C(n+2*p-2, p-2), p >= 1. - Johannes W. Meijer, Oct 03 2013
Let A(x,t) denote the o.g.f. Then 1 + x*d/dx(A(x,t))/A(x,t) = 1 + (1 + t)*x + (1 + 2*t + 3*t^2)*x^2 + (1 + 3*t + 6*t^2 + 10*t^3)*x^3 + ... is the o.g.f. for A059481. - Peter Bala, Jul 21 2015
The n-th row polynomial equals the n-th degree Taylor polynomial of the function (1 - 2*x)/(1 - x)^(n+2) about 0. For example, for n = 4, (1 - 2*x)/(1 - x)^6 = 1 + 4*x + 9*x^2 + 14*x^3 + 14*x^4 + O(x^5). - Peter Bala, Feb 18 2018
T(n,k) = binomial(n + k + 1, k) - 2*binomial(n + k, k - 1), for 0 <= k <= n. - David Callan, Jun 15 2022

A106566 Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 1, 1, 1, 1, 1, 1, 1, ... ] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ... ] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 5, 3, 1, 0, 14, 14, 9, 4, 1, 0, 42, 42, 28, 14, 5, 1, 0, 132, 132, 90, 48, 20, 6, 1, 0, 429, 429, 297, 165, 75, 27, 7, 1, 0, 1430, 1430, 1001, 572, 275, 110, 35, 8, 1, 0, 4862, 4862, 3432, 2002, 1001, 429, 154, 44, 9, 1
Offset: 0

Views

Author

Philippe Deléham, May 30 2005

Keywords

Comments

Catalan convolution triangle; g.f. for column k: (x*c(x))^k with c(x) g.f. for A000108 (Catalan numbers).
Riordan array (1, xc(x)), where c(x) the g.f. of A000108; inverse of Riordan array (1, x*(1-x)) (see A109466).
Diagonal sums give A132364. - Philippe Deléham, Nov 11 2007

Examples

			Triangle begins:
  1;
  0,   1;
  0,   1,   1;
  0,   2,   2,  1;
  0,   5,   5,  3,  1;
  0,  14,  14,  9,  4,  1;
  0,  42,  42, 28, 14,  5, 1;
  0, 132, 132, 90, 48, 20, 6, 1;
From _Paul Barry_, Sep 28 2009: (Start)
Production array is
  0, 1,
  0, 1, 1,
  0, 1, 1, 1,
  0, 1, 1, 1, 1,
  0, 1, 1, 1, 1, 1,
  0, 1, 1, 1, 1, 1, 1,
  0, 1, 1, 1, 1, 1, 1, 1,
  0, 1, 1, 1, 1, 1, 1, 1, 1,
  0, 1, 1, 1, 1, 1, 1, 1, 1, 1 (End)
		

Crossrefs

The three triangles A059365, A106566 and A099039 are the same except for signs and the leading term.
See also A009766, A033184, A059365 for other versions.
The following are all versions of (essentially) the same Catalan triangle: A009766, A030237, A033184, A059365, A099039, A106566, A130020, A047072.

Programs

  • Magma
    A106566:= func< n,k | n eq 0 select 1 else (k/n)*Binomial(2*n-k-1, n-k) >;
    [A106566(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 06 2021
    
  • Maple
    A106566 := proc(n,k)
        if n = 0 then
            1;
        elif k < 0 or k > n then
            0;
        else
            binomial(2*n-k-1,n-k)*k/n ;
        end if;
    end proc: # R. J. Mathar, Mar 01 2015
  • Mathematica
    T[n_, k_] := Binomial[2n-k-1, n-k]*k/n; T[0, 0] = 1; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 18 2017 *)
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[1&, #(1-Sqrt[1-4#])/(2#)&, 11] // Flatten (* Jean-François Alcover, Jul 16 2019 *)
  • PARI
    {T(n, k) = if( k<=0 || k>n, n==0 && k==0, binomial(2*n - k, n) * k/(2*n - k))}; /* Michael Somos, Oct 01 2022 */
  • Sage
    def A106566(n, k): return 1 if (n==0) else (k/n)*binomial(2*n-k-1, n-k)
    flatten([[A106566(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 06 2021
    

Formula

T(n, k) = binomial(2n-k-1, n-k)*k/n for 0 <= k <= n with n > 0; T(0, 0) = 1; T(0, k) = 0 if k > 0.
T(0, 0) = 1; T(n, 0) = 0 if n > 0; T(0, k) = 0 if k > 0; for k > 0 and n > 0: T(n, k) = Sum_{j>=0} T(n-1, k-1+j).
Sum_{j>=0} T(n+j, 2j) = binomial(2n-1, n), n > 0.
Sum_{j>=0} T(n+j, 2j+1) = binomial(2n-2, n-1), n > 0.
Sum_{k>=0} (-1)^(n+k)*T(n, k) = A064310(n). T(n, k) = (-1)^(n+k)*A099039(n, k).
Sum_{k=0..n} T(n, k)*x^k = A000007(n), A000108(n), A000984(n), A007854(n), A076035(n), A076036(n), A127628(n), A126694(n), A115970(n) for x = 0,1,2,3,4,5,6,7,8 respectively.
Sum_{k>=0} T(n, k)*x^(n-k) = C(x, n); C(x, n) are the generalized Catalan numbers.
Sum_{j=0..n-k} T(n+k,2*k+j) = A039599(n,k).
Sum_{j>=0} T(n,j)*binomial(j,k) = A039599(n,k).
Sum_{k=0..n} T(n,k)*A000108(k) = A127632(n).
Sum_{k=0..n} T(n,k)*(x+1)^k*x^(n-k) = A000012(n), A000984(n), A089022(n), A035610(n), A130976(n), A130977(n), A130978(n), A130979(n), A130980(n), A131521(n) for x= 0,1,2,3,4,5,6,7,8,9 respectively. - Philippe Deléham, Aug 25 2007
Sum_{k=0..n} T(n,k)*A000108(k-1) = A121988(n), with A000108(-1)=0. - Philippe Deléham, Aug 27 2007
Sum_{k=0..n} T(n,k)*(-x)^k = A000007(n), A126983(n), A126984(n), A126982(n), A126986(n), A126987(n), A127017(n), A127016(n), A126985(n), A127053(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Oct 27 2007
T(n,k)*2^(n-k) = A110510(n,k); T(n,k)*3^(n-k) = A110518(n,k). - Philippe Deléham, Nov 11 2007
Sum_{k=0..n} T(n,k)*A000045(k) = A109262(n), A000045: Fibonacci numbers. - Philippe Deléham, Oct 28 2008
Sum_{k=0..n} T(n,k)*A000129(k) = A143464(n), A000129: Pell numbers. - Philippe Deléham, Oct 28 2008
Sum_{k=0..n} T(n,k)*A100335(k) = A002450(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A100334(k) = A001906(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A099322(k) = A015565(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A106233(k) = A003462(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A151821(k+1) = A100320(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A082505(k+1) = A144706(n). - Philippe Deléham, Oct 30 2008
Sum_{k=0..n} T(n,k)*A000045(2k+2) = A026671(n). - Philippe Deléham, Feb 11 2009
Sum_{k=0..n} T(n,k)*A122367(k) = A026726(n). - Philippe Deléham, Feb 11 2009
Sum_{k=0..n} T(n,k)*A008619(k) = A000958(n+1). - Philippe Deléham, Nov 15 2009
Sum_{k=0..n} T(n,k)*A027941(k+1) = A026674(n+1). - Philippe Deléham, Feb 01 2014
G.f.: Sum_{n>=0, k>=0} T(n, k)*x^k*z^n = 1/(1 - x*z*c(z)) where c(z) the g.f. of A000108. - Michael Somos, Oct 01 2022

Extensions

Formula corrected by Philippe Deléham, Oct 31 2008
Corrected by Philippe Deléham, Sep 17 2009
Corrected by Alois P. Heinz, Aug 02 2012

A032357 Convolution of Catalan numbers and powers of -1.

Original entry on oeis.org

1, 0, 2, 3, 11, 31, 101, 328, 1102, 3760, 13036, 45750, 162262, 580638, 2093802, 7601043, 27756627, 101888163, 375750537, 1391512653, 5172607767, 19293659253, 72188904387, 270870709263, 1019033438061, 3842912963391, 14524440108761
Offset: 0

Views

Author

Keywords

Comments

Absolute value of the alternating sum of Catalan Numbers. - Alexander Adamchuk, Jul 03 2006
Sums of two consecutive terms are a(n-1) + a(n) = 1, 2, 5, 14, 42, ... = A000108(n) (Catalan Numbers). The prime p divides a((p-3)/2) for p = 11, 19, 29, 31, 41, 59, 61, 71, ... = A045468 (Primes congruent to {1, 4} mod 5). Prime p divides a(2*p+1) for p = 5, 11, 19, 29, 31, 41, 59, 61, 71, ... = A038872 (Primes congruent to {0, 1, 4} mod 5). Also odd primes where 5 is a square mod p. - Alexander Adamchuk, Jul 03 2006
Hankel transform is F(2*n+1), where F = A000045. - Paul Barry, Jul 22 2008
Equals INVERTi transform of A000958. - Gary W. Adamson, Apr 10 2009
Inverse binomial transform of A002212. - Philippe Deléham, Sep 17 2009
Number of singleton and plus-decomposable (2143, 2413, 3142)-avoiding permutations with no +bonds (ascents by 1), with offset 1. Equivalently, number of (2143, 2413, 3142)-avoiding permutations that start with 1 or end with n (top entry). E.g., 132 and 213 for n = 3; 1324, 1432, 3214 for n = 4. - Alexander Burstein, May 22 2015

Crossrefs

Programs

  • Maple
    rec:= (n+1)*a(n) +3*(-n+1)*a(n-1) +2*(-2*n+1)*a(n-2)=0:
    A:= gfun:-rectoproc({rec,a(0)=1,a(1)=0},a(n),remember):
    seq(A(n),n=0..50); # Robert Israel, May 22 2015
  • Mathematica
    Table[Sum[(-1)^(k+n)*CatalanNumber[k],{k,0,n}],{n,0,60}] (* Alexander Adamchuk, Jul 03 2006 *)
    Round@Table[(-1)^n/GoldenRatio + CatalanNumber[n + 1] Hypergeometric2F1[1, n + 3/2, n + 3, -4], {n, 0, 20}] (* Round is equivalent to FullSimplify here, but is much faster - Vladimir Reshetnikov, Oct 02 2016 *)
    Table[(CatalanNumber[n] (2 + (n + 1) Hypergeometric2F1[1, -n, 1/2, 5/4]) - (-1)^n)/2, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 03 2016 *)
  • Sage
    def A032357():
        f, c, n = 1, 1, 1
        while True:
            yield f
            n += 1
            c = c * (4*n - 6) // n
            f = c - f
    a = A032357()
    print([next(a) for  in range(27)]) # _Peter Luschny, Nov 30 2016

Formula

G.f.: c(x)/(1 + x), where c(x) is the g.f. for the Catalan numbers A000108.
a(n) = Sum_{k=0..n} (-1)^(n-k)*C(k), where C(k) = A000108(k).
a(n) = ((-1)^(n+1) - binomial(2*(n+1), n+1)*Sum_{k=0..n+1} (-5)^k*binomial(n+1, k)/binomial(2*k, k))/2.
a(n) = C(2*n, n)/(n+1) - a(n-1) = A000108(n) - a(n-1) with a(0) = 1. - Labos Elemer, Apr 26 2003
Conjecture: (n+1)*a(n) + 3*(-n+1)*a(n-1) + 2*(-2*n+1)*a(n-2) = 0. - R. J. Mathar, Nov 30 2012
Conjecture is true since the g.f. satisfies (x - 3*x^2 - 4*x^3)*g'(x) + (1 - 6*x^2)*g(x) = 1. - Robert Israel, May 22 2015
a(n) = (-1)^n/A001622 + A000108(n+1)*hypergeom([1, n + 3/2], [n + 3], -4). - Vladimir Reshetnikov, Oct 02 2016
a(n) ~ 2^(2*n + 2) / (5*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 03 2016
a(n) = (A000108(n) * (2 + (n + 1)*hypergeom([1,-n], [1/2], 5/4)) - (-1)^n)/2. - Vladimir Reshetnikov, Oct 03 2016

Extensions

More terms from Christian G. Bower, Apr 15 1998
More terms from Alexander Adamchuk, Jul 03 2006

A114495 Number of returns to the x-axis in all hill-free Dyck paths of semilength n (a Dyck path is said to be hill-free if it has no peaks at level 1).

Original entry on oeis.org

0, 1, 2, 7, 22, 73, 246, 844, 2936, 10334, 36736, 131709, 475714, 1729345, 6322534, 23232616, 85757008, 317839438, 1182341740, 4412949358, 16521076012, 62024023306, 233451103612, 880764587512, 3330234867792, 12617475113968
Offset: 1

Views

Author

Emeric Deutsch, Dec 01 2005

Keywords

Comments

Row sums of A114494.
Self-convolution of A000958. - Sergio Falcon, Oct 28 2008
Removing the initial zeros and setting both offsets to zero, this here is the Catalan transform of A006918. - R. J. Mathar, Jun 29 2009

Examples

			a(4) = 7 because in the six hill-free Dyck paths of semilength 4, namely
UUD(D)UUD(D), UUDUDUD(D), UUDUUDD(D), UUUDDUD(D), UUUDUDD(D) and UUUUDDD(D), we have altogether 7 returns to the x-axis (shown between parentheses).
		

Crossrefs

Cf. A114494.

Programs

  • Maple
    a:=n->sum(k^2*binomial(2*n-2*k,n-2*k)/(n-k),k=1..floor(n/2)): seq(a(n),n=1..30);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<3, n*(n-1)/2,
          ((105*n^3-286*n^2+123*n+10)*a(n-1)
            +2*(n-1)*(2*n-1)*(15*n+2)*a(n-2))/
          (2*(n-2)*(n+2)*(15*n-13)))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 08 2014
  • Mathematica
    Rest[CoefficientList[Series[(1-Sqrt[1-4*x])^2/(1+Sqrt[1-4*x]+2*x)^2, {x, 0, 20}], x]] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    for(n=1,25, print1(sum(k=1,floor(n/2), k^2*binomial(2*n-2*k, n-2*k)/(n-k)), ", ")) \\ G. C. Greubel, Jan 31 2017

Formula

a(n) = Sum_{k=1..floor(n/2)} k^2*binomial(2*n-2*k, n-2*k)/(n-k).
G.f.: (1 - sqrt(1-4*x))^2/(1 + sqrt(1-4*x) + 2*x)^2.
a(n) ~ 5*4^(n+1)/(27*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 20 2014
D-finite with recurrence 2*(n+2)*a(n) +(-7*n-1)*a(n-1) +2*(-3*n-1)*a(n-2) +(7*n-27)*a(n-3) +2*(2*n-5)*a(n-4)=0. - R. J. Mathar, Jul 26 2022

A135339 Number of Dyck paths of semilength n having no DUDU's starting at level 1.

Original entry on oeis.org

1, 1, 2, 4, 11, 32, 99, 318, 1051, 3550, 12200, 42520, 149930, 533890, 1917181, 6934722, 25243539, 92405718, 339940116, 1256122632, 4660081434, 17350844808, 64814186646, 242838410652, 912333763806, 3436240272972, 12972454874704, 49078874293528, 186051766180496
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2007

Keywords

Comments

Column 0 of A135333. - Emeric Deutsch, Dec 13 2007
Apparently, for n > 0, a(n) is the number of Motzkin paths of length n-1 with two colors of flat step (F and f) and avoiding FF at level 0. E.g., for n = 3, the a(3) = 4 paths are UD, ff, fF and Ff. - David Scambler, Jun 27 2013
Number of standard Young tableaux of shape n^2 that avoid the consecutive pattern [12][34][56], read by columns. - Ran Pan, Sep 27 2015
From Petros Hadjicostas, Jul 27 2020: (Start)
Since an explicit formula for a(n) in terms of binomial coefficients is known (see Emeric Deutsch's formula), the Wilf-Zeilberger method provides an easy proof of R. J. Mathar's recurrence.
Let us suppose we know only the g.f. A(z) given in the Formula section below. Write the LHS(n) of R. J. Mathar's recurrence as 2*(n + 1)*a(n) + (-5*(n-1) - 4)*a(n-1) + (-11*(n-2) + 6)*a(n-2) + 2*(-2*(n-3) + 1)*a(n-3), multiply by x^n, and sum from n = 3 to infinity. After some simple algebra, we get Sum_{n >= 3} LHS(n)*z^n = z*A'(z)*(2 - 5*z - 11*z^2 - 4*z^3) + A(z)*(2 - 4*z + 6*z^2 + 2*z^3) - (2 + 9*z^2).
We rationalize the denominator of A(z) and get A(z) = (2*z*C(z) - z + C(z))*(3 + sqrt(1 - 4*z))/(2*(z + 2)), where C(z) is the o.g.f. of A000108. Now substitute the formula for A(z) in the expression above and use a CAS (e.g., SageMath) to simplify.
We get that Sum_{n >= 3} LHS(n)*z^n = z^3. This means R. J. Mathar's recurrence is correct for n >= 4, but gives 1 for n = 3. (End)

Examples

			a(4) = 11 because among the 14 (= A000108(4)) Dyck paths of semilength 4 the following paths do not qualify: UDUDUUDD, UUDDUDUD and UDUDUDUD.
		

Crossrefs

Programs

  • Maple
    G:=(2*z*C-z+C)/(1+z*C): C:=((1-sqrt(1-4*z))*1/2)/z: Gser:=series(G,z=0,30): seq(coeff(Gser,z,n),n=0..25); # Emeric Deutsch, Dec 13 2007
    a:= proc (n) options operator, arrow: binomial(2*n-2, n-1)/n+(sum((-1)^j*(j+3)*binomial(2*n-j-2,n),j=0..n-2))/(n+1) end proc: 1, seq(a(n),n=1..25); # Emeric Deutsch, Dec 13 2007
    # third Maple program:
    a:= proc(n) option remember; `if`(n<4, [1$2, 2, 4][n+1],
         ((5*n-1)*a(n-1)+(11*n-28)*a(n-2)+(4*n-14)*a(n-3))/(2*n+2))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 28 2015
    A135339List := proc(m) local A, P, n; A := [1,1,2]; P := [1,2];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(P), P[-2]]);
    A := [op(A), P[-1]] od; A end: A135339List(28); # Peter Luschny, Mar 26 2022
  • Mathematica
    CoefficientList[Series[(2*x*(1-Sqrt[1-4*x])/(2*x)-x+(1-Sqrt[1-4*x])/(2*x))/(1+x*(1-Sqrt[1-4*x])/(2*x)), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)

Formula

G.f.: (2*z*C - z + C)/(1 + z*C), where C = (1 - sqrt(1 - 4*z))/(2*z) is the g.f. of the Catalan numbers (A000108). - Emeric Deutsch, Dec 13 2007
a(n) = binomial(2*n-2, n-1)/n + (Sum_{j=0..n-2} (-1)^j * (j + 3) * binomial(2*n-j-2, n))/(n+1) for n >= 1. - Emeric Deutsch, Dec 13 2007
a(n) = A000958(n-1) + A000958(n). - Philippe Deléham, Dec 02 2009
a(n) ~ 25 * 4^(n - 1)/(9 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 20 2014
Conjecture: 2*(n + 1)*a(n) + (-5*n + 1)*a(n-1) + (-11*n + 28)*a(n-2) + 2*(-2*n + 7)*a(n-3) = 0 for n >= 4. - R. J. Mathar, Oct 20 2015

Extensions

Edited and extended by Emeric Deutsch, Dec 13 2007

A065602 Triangle T(n,k) giving number of hill-free Dyck paths of length 2n and having height of first peak equal to k.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 8, 6, 3, 1, 24, 18, 10, 4, 1, 75, 57, 33, 15, 5, 1, 243, 186, 111, 54, 21, 6, 1, 808, 622, 379, 193, 82, 28, 7, 1, 2742, 2120, 1312, 690, 311, 118, 36, 8, 1, 9458, 7338, 4596, 2476, 1164, 474, 163, 45, 9, 1, 33062, 25724, 16266, 8928, 4332, 1856, 692, 218, 55, 10, 1
Offset: 2

Views

Author

N. J. A. Sloane, Dec 02 2001

Keywords

Comments

A Riordan triangle.
Subtriangle of triangle in A167772. - Philippe Deléham, Nov 14 2009
Riordan array (f(x), x*g(x)) where f(x) is the g.f. of A000958 and g(x) is the g.f. of A000108. - Philippe Deléham, Jan 23 2010

Examples

			T(3,2)=1 reflecting the unique Dyck path (UUDUDD) of length 6, with no hills and height of first peak equal to 2.
Triangle begins:
     1;
     1,    1;
     3,    2,    1;
     8,    6,    3,   1;
    24,   18,   10,   4,   1;
    75,   57,   33,  15,   5,   1;
   243,  186,  111,  54,  21,   6,  1;
   808,  622,  379, 193,  82,  28,  7,  1;
  2742, 2120, 1312, 690, 311, 118, 36,  8,  1;
		

Crossrefs

Row sums give A000957 (the Fine sequence).
First column is A000958.

Programs

  • Haskell
    a065602 n k = sum
       [(k-1+2*j) * a007318' (2*n-k-1-2*j) (n-1) `div` (2*n-k-1-2*j) |
        j <- [0 .. div (n-k) 2]]
    a065602_row n = map (a065602 n) [2..n]
    a065602_tabl = map a065602_row [2..]
    -- Reinhard Zumkeller, May 15 2014
    
  • Maple
    a := proc(n,k) if n=0 and k=0 then 1 elif k<2 or k>n then 0 else sum((k-1+2*j)*binomial(2*n-k-1-2*j,n-1)/(2*n-k-1-2*j),j=0..floor((n-k)/2)) fi end: seq(seq(a(n,k),k=2..n),n=1..14);
  • Mathematica
    nmax = 12; t[n_, k_] := Sum[(k-1+2j)*Binomial[2n-k-1-2j, n-1] / (2n-k-1-2j), {j, 0, (n-k)/2}]; Flatten[ Table[t[n, k], {n, 2, nmax}, {k, 2, n}]] (* Jean-François Alcover, Nov 08 2011, after Maple *)
  • SageMath
    def T(n,k): return sum( (k+2*j-1)*binomial(2*n-2*j-k-1, n-1)/(2*n-2*j-k-1) for j in (0..(n-k)//2) )
    flatten([[T(n,k) for k in (2..n)] for n in (2..12)]) # G. C. Greubel, May 26 2022

Formula

T(n, 2) = A000958(n-1).
Sum_{k=2..n} T(n, k) = A000957(n+1).
From Emeric Deutsch, Feb 23 2004: (Start)
T(n, k) = Sum_{j=0..floor((n-k)/2)} (k-1+2*j)*binomial(2*n-k-1-2*j, n-1)/(2*n-k-1-2*j).
G.f.: t^2*z^2*C/( (1-z^2*C^2)*(1-t*z*C) ), where C = (1-sqrt(1-4*z))/(2*z) is the Catalan function. (End)
T(n,k) = A167772(n-1,k-1), k=2..n. - Reinhard Zumkeller, May 15 2014
From G. C. Greubel, May 26 2022: (Start)
T(n, n-1) = A000027(n-2).
T(n, n-2) = A000217(n-2).
T(n, n-3) = A166830(n-3). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2004

A167772 Riordan array (c(x)/(1+x*c(x)), x*c(x)), c(x) the g.f. of A000108.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 3, 2, 1, 6, 8, 6, 3, 1, 18, 24, 18, 10, 4, 1, 57, 75, 57, 33, 15, 5, 1, 186, 243, 186, 111, 54, 21, 6, 1, 622, 808, 622, 379, 193, 82, 28, 7, 1, 2120, 2742, 2120, 1312, 690, 311, 118, 36, 8, 1, 7338, 9458, 7338, 4596, 2476, 1164, 474, 163, 45, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 11 2009, corrected Nov 12 2009

Keywords

Examples

			Triangle begins:
     1;
     0,    1;
     1,    1,    1;
     2,    3,    2,    1;
     6,    8,    6,    3,   1;
    18,   24,   18,   10,   4,   1;
    57,   75,   57,   33,  15,   5,   1;
   186,  243,  186,  111,  54,  21,   6,  1;
   622,  808,  622,  379, 193,  82,  28,  7,  1;
  2120, 2742, 2120, 1312, 690, 311, 118, 36,  8,  1;
Production matrix begins:
  0, 1;
  1, 1, 1;
  1, 1, 1, 1;
  1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  ... - _Philippe Deléham_, Mar 03 2013
		

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a167772 n k = genericIndex (a167772_row n) k
    a167772_row n = genericIndex a167772_tabl n
    a167772_tabl = [1] : [0, 1] :
                   map (\xs@(:x:) -> x : xs) (tail a065602_tabl)
    -- Reinhard Zumkeller, May 15 2014
    
  • Mathematica
    A065602[n_, k_]:= A065602[n,k]= Sum[(k-1+2*j)*Binomial[2*(n-j)-k-1, n-1]/(2*(n-j) -k-1), {j, 0, (n-k)/2}];
    T[n_, k_]:= If[k==0, A065602[n+1,3] + Boole[n==0], A065602[n+1, k+1]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 26 2022 *)
  • SageMath
    def A065602(n,k): return sum( (k+2*j-1)*binomial(2*n-2*j-k-1, n-1)/(2*n-2*j-k-1) for j in (0..(n-k)//2) )
    def A167772(n,k):
        if (k==0): return A065602(n+1,3) + bool(n==0)
        else: return A065602(n+1,k+1)
    flatten([[A167772(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 26 2022

Formula

Sum_{k=0..n} T(n, k) = A000958(n+1).
From Philippe Deléham, Nov 12 2009: (Start)
Sum_{k=0..n} T(n,k)*2^k = A014300(n).
Sum_{k=0..n} T(n,k)*2^(n-k) = A064306(n). (End)
For n > 0: T(n,0) = A065602(n+1,3), T(n,k) = A065602(n+1,k+1), k = 1..n. - Reinhard Zumkeller, May 15 2014

A355173 The Fuss-Catalan triangle of order 1, read by rows. Related to binary trees.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 5, 0, 1, 4, 9, 14, 0, 1, 5, 14, 28, 42, 0, 1, 6, 20, 48, 90, 132, 0, 1, 7, 27, 75, 165, 297, 429, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 0, 1, 10, 54, 208, 637, 1638, 3640, 7072, 11934, 16796
Offset: 0

Views

Author

Peter Luschny, Jun 25 2022

Keywords

Comments

The Fuss-Catalan triangle of order m is a regular, (0, 0)-based table recursively defined as follows: Set row(0) = [1] and row(1) = [0, 1]. Now assume row(n-1) already constructed and duplicate the last element of row(n-1). Next apply the cumulative sum m times to this list to get row(n). Here m = 1. (See the Python program for a reference implementation.)
This definition also includes the classical Fuss-Catalan numbers, since T(n, n) = A000108(n), or row 2 in A355262. For m = 2 see A355172 and for m = 3 A355174. More generally, for n >= 1 all Fuss-Catalan sequences (A355262(n, k), k >= 0) are the main diagonals of the Fuss-Catalan triangles of order n - 1.

Examples

			Table T(n, k) begins:
  [0] [1]
  [1] [0, 1]
  [2] [0, 1, 2]
  [3] [0, 1, 3,  5]
  [4] [0, 1, 4,  9,  14]
  [5] [0, 1, 5, 14,  28,  42]
  [6] [0, 1, 6, 20,  48,  90,  132]
  [7] [0, 1, 7, 27,  75, 165,  297, 429]
  [8] [0, 1, 8, 35, 110, 275,  572, 1001, 1430]
  [9] [0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862]
Seen as an array reading the diagonals starting from the main diagonal:
  [0] 1, 1, 2,  5,  14,   42,  132,   429,  1430,   4862,   16796, ...  A000108
  [1] 0, 1, 3,  9,  28,   90,  297,  1001,  3432,  11934,   41990, ...  A000245
  [2] 0, 1, 4, 14,  48,  165,  572,  2002,  7072,  25194,   90440, ...  A099376
  [3] 0, 1, 5, 20,  75,  275, 1001,  3640, 13260,  48450,  177650, ...  A115144
  [4] 0, 1, 6, 27, 110,  429, 1638,  6188, 23256,  87210,  326876, ...  A115145
  [5] 0, 1, 7, 35, 154,  637, 2548,  9996, 38760, 149226,  572033, ...  A000588
  [6] 0, 1, 8, 44, 208,  910, 3808, 15504, 62016, 245157,  961400, ...  A115147
  [7] 0, 1, 9, 54, 273, 1260, 5508, 23256, 95931, 389367, 1562275, ...  A115148
		

Crossrefs

A000108 (main diagonal), A000245 (subdiagonal), A002057 (diagonal 2), A000344 (diagonal 3), A000027 (column 2), A000096 (column 3), A071724 (row sums), A000958 (alternating row sums), A262394 (main diagonal of array).
Variants: A009766 (main variant), A030237, A130020.
Cf. A123110 (triangle of order 0), A355172 (triangle of order 2), A355174 (triangle of order 3), A355262 (Fuss-Catalan array).

Programs

  • Python
    from functools import cache
    from itertools import accumulate
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 1]
        row = Trow(n - 1) + [Trow(n - 1)[n - 1]]
        return list(accumulate(row))
    for n in range(11): print(Trow(n))

Formula

The general formula for the Fuss-Catalan triangles is, for m >= 0 and 0 <= k <= n:
FCT(n, k, m) = (m*(n - k) + m + 1)*(m*n + k - 1)!/((m*n + 1)!*(k - 1)!) for k > 0 and FCT(n, 0, m) = 0^n. The case considered here is T(n, k) = FCT(n, k, 1).
T(n, k) = (n - k + 2)*(n + k - 1)!/((n + 1)!*(k - 1)!) for k > 0; T(n, 0) = 0^n.
The g.f. of row n of the FC-triangle of order m is 0^n + (x - (m + 1)*x^2) / (1 - x)^(m*n + 2), thus:
T(n, k) = [x^k] (0^n + (x - 2*x^2)/(1 - x)^(n + 2)).
Showing 1-10 of 20 results. Next