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.

Previous Showing 11-20 of 23 results. Next

A325199 Number of integer partitions of n such that the difference between the length of the minimal triangular partition containing and the maximal triangular partition contained in the Young diagram is 2.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 6, 3, 2, 9, 15, 12, 6, 12, 27, 38, 34, 22, 20, 43, 74, 94, 90, 67, 48, 69, 130, 194, 232, 230, 187, 132, 129, 218, 364, 497, 576, 578, 498, 367, 290, 378, 642, 977, 1264, 1435, 1448, 1290, 1000, 735, 728
Offset: 0

Views

Author

Gus Wiseman, Apr 11 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A325197.

Examples

			The a(3) = 2 through a(10) = 15 partitions (empty columns not shown):
  (3)    (41)    (33)    (43)    (521)    (333)    (433)
  (111)  (2111)  (42)    (2221)  (32111)  (441)    (442)
                 (222)   (4111)           (522)    (532)
                 (411)                    (531)    (541)
                 (2211)                   (3222)   (3322)
                 (3111)                   (5211)   (3331)
                                          (32211)  (4222)
                                          (33111)  (4411)
                                          (42111)  (5221)
                                                   (5311)
                                                   (32221)
                                                   (33211)
                                                   (42211)
                                                   (43111)
                                                   (52111)
		

Crossrefs

Programs

  • Mathematica
    otb[ptn_]:=Min@@MapIndexed[#1+#2[[1]]-1&,Append[ptn,0]];
    otbmax[ptn_]:=Max@@MapIndexed[#1+#2[[1]]-1&,Append[ptn,0]];
    Table[Length[Select[IntegerPartitions[n],otbmax[#]-otb[#]==2&]],{n,0,30}]

A136624 Irregular triangle read by rows: classify each numeric partition by sum of its parts and by the size of the staircase Ferrers board required to contain it. The triangle gives the number of partitions in each class, cf. A136102 and A136103.

Original entry on oeis.org

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, 2, 2, 4, 6, 12, 15, 23, 30, 39, 42, 40, 35, 25, 15, 6, 1, 2, 2, 4, 6, 10, 16, 23, 29, 42, 56, 71, 88, 103, 112, 114, 102, 86, 65, 41, 21, 7, 1, 2, 2, 4, 6, 10, 14, 24, 31, 43
Offset: 0

Views

Author

Alford Arnold, Jan 17 2008

Keywords

Comments

Sequences A136102 and A136103 encode the numeric partitions by least prime signature and the Ferrers boards by 1 2 12 360 75600 174636000 ... A006939.

Examples

			Starting a new row each time we are required to use a larger Ferrer board the triangle begins:
  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
  .....................2...2...4...6..12..15..23..30..39..42..40..35..25..15..6..1
		

Crossrefs

Cf. A000041 (column sums), A000108, A006939, A025487, A071724 (row sums), A136102, A136103, A136625.

Programs

  • PARI
    d(s,n) = {my(v = setminus([1..n],s), r=[], c=1); for(i=2, #v, if(v[i]==v[i-1]+1, c++ , r=concat(r, c); c=1)) ; return(concat(r, c))}
    tri(n) = {n*(n+1)/2}
    S(n) = {my(R = x^tri(n)); if(n<1, return(1), for(i=1,n-1, forsubset([n,i], s, my(u=d(vecextract([1..n],s),n)); R+=(x^(tri(n)-sum(j=1,#u, tri(u[j]))))*prod(j=1,#u, sum(z=0,u[j]-1, S(z))))); return(R))}
    A136624(row_n) = {Vecrev(S(row_n)/x^(row_n))} \\ John Tyler Rascoe, Feb 25 2025

Extensions

a(26) onwards from John Tyler Rascoe, Feb 25 2025

A325194 Regular triangle read by rows where T(n,k) is the number of integer partitions of n with co-rank n - k, where co-rank is the greater of the length and the largest part.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 7, 1, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Apr 13 2019

Keywords

Examples

			Triangle begins:
  1
  0  0
  0  1  0
  0  0  0  0
  0  0  2  0  0
  0  0  0  1  0  0
  0  0  0  2  1  0  0
  0  0  0  0  2  0  0  0
  0  0  0  0  2  3  0  0  0
  0  0  0  0  0  2  3  0  0  0
  0  0  0  0  0  2  4  2  0  0  0
  0  0  0  0  0  0  2  5  1  0  0  0
  0  0  0  0  0  0  2  4  7  1  0  0  0
  0  0  0  0  0  0  0  2  6  6  0  0  0  0
  0  0  0  0  0  0  0  2  4  9  7  0  0  0  0
  0  0  0  0  0  0  0  0  2  6 11  5  0  0  0  0
  0  0  0  0  0  0  0  0  2  4 10 14  5  0  0  0  0
  0  0  0  0  0  0  0  0  0  2  6 13 15  3  0  0  0  0
  0  0  0  0  0  0  0  0  0  2  4 10 19 17  2  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  2  6 14 22 17  1  0  0  0  0
  0  0  0  0  0  0  0  0  0  0  2  4 10 21 29 17  1  0  0  0  0
Row n = 16 counts the following partitions:
  (8)         (72)       (64)      (533)    (444)
  (11111111)  (711)      (622)     (542)    (3333)
              (2211111)  (631)     (551)    (4332)
              (3111111)  (6211)    (5222)   (4422)
                         (61111)   (5321)   (4431)
                         (222211)  (5411)
                         (322111)  (32222)
                         (331111)  (33221)
                         (421111)  (33311)
                         (511111)  (42221)
                                   (43211)
                                   (44111)
                                   (52211)
                                   (53111)
		

Crossrefs

Column sums are A000041. Row sums are A325193.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[k],Max[Length[#],Max[#]]==n-k&]],{n,0,10},{k,0,n}]

A352680 Array read by ascending antidiagonals. A family of Catalan-like sequences. A(n, k) = [x^k] ((n - 1)*x + 1)*(1 - sqrt(1 - 4*x))/(2*x).

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 3, 1, 3, 3, 5, 9, 1, 4, 4, 7, 14, 28, 1, 5, 5, 9, 19, 42, 90, 1, 6, 6, 11, 24, 56, 132, 297, 1, 7, 7, 13, 29, 70, 174, 429, 1001, 1, 8, 8, 15, 34, 84, 216, 561, 1430, 3432, 1, 9, 9, 17, 39, 98, 258, 693, 1859, 4862, 11934, 1, 10, 10, 19, 44, 112, 300, 825, 2288, 6292, 16796, 41990
Offset: 0

Views

Author

Peter Luschny, Mar 27 2022

Keywords

Examples

			Array starts:
n\k 0, 1,  2,  3,  4,   5,   6,    7,    8,     9, ...
------------------------------------------------------
[0] 1, 0,  1,  3,  9,  28,  90,  297, 1001,  3432, ... A071724
[1] 1, 1,  2,  5, 14,  42, 132,  429, 1430,  4862, ... A000108
[2] 1, 2,  3,  7, 19,  56, 174,  561, 1859,  6292, ... A071716
[3] 1, 3,  4,  9, 24,  70, 216,  693, 2288,  7722, ... A038629
[4] 1, 4,  5, 11, 29,  84, 258,  825, 2717,  9152, ... A352681
[5] 1, 5,  6, 13, 34,  98, 300,  957, 3146, 10582, ...
[6] 1, 6,  7, 15, 39, 112, 342, 1089, 3575, 12012, ...
[7] 1, 7,  8, 17, 44, 126, 384, 1221, 4004, 13442, ...
[8] 1, 8,  9, 19, 49, 140, 426, 1353, 4433, 14872, ...
[9] 1, 9, 10, 21, 54, 154, 468, 1485, 4862, 16302, ...
.
Seen as a triangle:
[0] 1;
[1] 1, 0;
[1] 1, 1, 1;
[2] 1, 2, 2,  3;
[3] 1, 3, 3,  5,  9;
[4] 1, 4, 4,  7, 14, 28;
[5] 1, 5, 5,  9, 19, 42,  90;
[6] 1, 6, 6, 11, 24, 56, 132, 297;
		

Crossrefs

Diagonals: A077587 (main), A271823.
Compare A352682 for a similar array based on the Bell numbers.

Programs

  • Julia
    # Compare with the Julia function A352686Row.
    function A352680Row(n, len)
        a = BigInt(n)
        P = BigInt[1]; T = BigInt[1]
        for k in 0:len-1
            T = push!(T, a)
            P = cumsum(push!(P, a))
            a = P[end]
        end
    T end
    for n in 0:9 println(A352680Row(n, 9)) end
  • Maple
    for n from 0 to 9 do
        ogf := ((n - 1)*x + 1)*(1 - sqrt(1 - 4*x))/(2*x);
        ser := series(ogf, x, 12):
        print(seq(coeff(ser, x, k), k = 0..9)); od:
    # Alternative:
    alias(PS = ListTools:-PartialSums):
    CatalanRow := proc(n, len) local a, k, P, R;
    a := n; P := [1]; R := [1];
    for k from 0 to len-1 do
        R := [op(R), a]; P := PS([op(P), a]); a := P[-1] od;
    R end: seq(lprint(CatalanRow(n, 9)), n = 0..9);
    # Recurrence:
    A := proc(n, k) option remember: if k < 3 then [1, n, n + 1][k + 1] else
    A(n, k-1)*((6 - 4*k)*(n - 3 + k*(3 + n)))/((1 + k)*(6 - k*(3 + n))) fi end:
    seq(print(seq(A(n, k), k = 0..9)), n = 0..9);
  • Mathematica
    T[n_, 0] := 1;
    T[n_, k_] := (n - 1) CatalanNumber[k - 1] + CatalanNumber[k];
    Table[T[n, k], {n, 0, 9}, {k, 0, 9}] // TableForm

Formula

A(n, k) = (n-1)*CatalanNumber(k-1) + CatalanNumber(k) for n >= 0 and k >= 1, A(n, 0) = 1. (Cf. A352682.)
D-finite with recurrence: A(n, k) = A(n, k-1)*((6 - 4*k)*(n - 3 + k*(3 + n)))/((1 + k)*(6 - k*(3 + n))) for k >= 3, otherwise 1, n, n + 1 for k = 0, 1, 2.
Given a list T let PS(T) denote the list of partial sums of T. Given two list S and T let [S, T] denote the concatenation of the lists. Further let P[end] denote the last element of the list P. Row n of the array A with length k can be computed by the following procedure:
A = [n], P = [1], R = [1];
Repeat k times: R = [R, A], P = PS([P, A]), A = [P[end]];
Return R.

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)).

A167769 Pendular trinomial triangle (p=0), read by rows of 2n+1 terms (n>=0), defined by the recurrence : if 0

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 3, 6, 8, 6, 3, 1, 0, 0, 1, 4, 10, 18, 24, 18, 10, 4, 1, 0, 0, 1, 5, 15, 33, 57, 75, 57, 33, 15, 5, 1, 0, 0, 1, 6, 21, 54, 111, 186, 243, 186, 111, 54, 21, 6, 1, 0, 0, 1, 7, 28, 82, 193, 379, 622, 808, 622, 379, 193, 82, 28, 7, 1, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Nov 11 2009

Keywords

Comments

See A119369 for p=1 and A122445 for p=2. The diagonals may be generated by iterated convolutions of a base sequence B (A000108(n)) with the sequence C (A000957(n+1)) of central terms.

Examples

			Triangle begins :
  1;
  1, 0,  0;
  1, 1,  1,  0,  0;
  1, 2,  3,  2,  1,  0,  0;
  1, 3,  6,  8,  6,  3,  1,  0,  0;
  1, 4, 10, 18, 24, 18, 10,  4,  1, 0, 0,
  1, 5, 15, 33, 57, 75, 57, 33, 15, 5, 1, 0, 0; ...
		

References

  • Kim, Ki Hang; Rogers, Douglas G.; Roush, Fred W. 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) - From N. J. A. Sloane, Jun 05 2012

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k=0 and n=0 then 1;
        elif k<0 or k>2*(n-1) then 0;
        elif n=2 and k<3 then 1;
        elif kG. C. Greubel, Mar 17 2021
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 && n==0, 1, If[k<0 || k>2*(n-1), 0, If[n==2 && k<3, 1, If[kG. C. Greubel, Mar 17 2021 *)
  • PARI
    T(n, k)=if(k==0 && n==0, 1, if(k>2*n-2 || k<0, 0, if(n==2 && k<=2, 1, if(kPaul D. Hanna, Nov 12 2009
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0 and n==0): return 1
        elif (k<0 or k>2*(n-1)): return 0
        elif (n==2 and k<3): return 1
        elif (kG. C. Greubel, Mar 17 2021

Formula

Sum_{k=0..2*n} T(n,k) = A071724(n) = [n=0] + 3*binomial(2n,n-1)/(n+2) = [n=0] + n*C(n)/(n+2), where C(n) are the Catalan numbers (A000108). - G. C. Greubel, Mar 17 2021

A370477 G.f. satisfies A(x) = ( 1 + x * (A(x)^(1/2) / (1-x))^(3/2) )^2.

Original entry on oeis.org

1, 2, 7, 24, 83, 290, 1023, 3640, 13052, 47124, 171190, 625328, 2295561, 8464690, 31339455, 116458200, 434217000, 1623971580, 6090823890, 22903571280, 86332453350, 326145976884, 1234662753126, 4682968975664, 17794062340008, 67726620644200
Offset: 0

Views

Author

Seiichi Manyama, Mar 31 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec((1+x*((1-sqrt(1-4*x))/(2*x))^3)^2)
    
  • PARI
    a(n, r=2, s=3/2, t=3/2, u=0) = r*sum(k=0, n, binomial(t*k+u*(n-k)+r, k)*binomial(n+(s-1)*k-1, n-k)/(t*k+u*(n-k)+r));

Formula

G.f.: B(x)^2 where B(x) is the g.f. of A071724.
a(n) = 2 * Sum_{k=0..n} binomial(3*k/2+2,k) * binomial(n+k/2-1,n-k)/(3*k/2+2).

A370478 G.f. satisfies A(x) = ( 1 + x * (A(x)^(1/3) / (1-x))^(3/2) )^3.

Original entry on oeis.org

1, 3, 12, 46, 174, 654, 2451, 9177, 34368, 128826, 483531, 1817673, 6844294, 25815660, 97539435, 369154485, 1399419360, 5313440610, 20205330660, 76946898744, 293443125804, 1120565939780, 4284550682478, 16402204879386, 62864294076480, 241205747620740
Offset: 0

Views

Author

Seiichi Manyama, Mar 31 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec((1+x*((1-sqrt(1-4*x))/(2*x))^3)^3)
    
  • PARI
    a(n, r=3, s=3/2, t=3/2, u=0) = r*sum(k=0, n, binomial(t*k+u*(n-k)+r, k)*binomial(n+(s-1)*k-1, n-k)/(t*k+u*(n-k)+r));

Formula

G.f.: B(x)^3 where B(x) is the g.f. of A071724.
a(n) = 3 * Sum_{k=0..n} binomial(3*k/2+3,k) * binomial(n+k/2-1,n-k)/(3*k/2+3).

A375085 Triangle read by rows: T(n,k) is the number of ballotlike paths ending at (n, k), with 0 <= k <= n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 3, 2, 1, 5, 9, 6, 3, 1, 14, 28, 21, 10, 4, 1, 42, 90, 76, 39, 15, 5, 1, 132, 297, 276, 159, 64, 21, 6, 1, 429, 1001, 1002, 643, 288, 97, 28, 7, 1, 1430, 3432, 3641, 2555, 1281, 475, 139, 36, 8, 1, 4862, 11934, 13261, 10004, 5536, 2300, 733, 191, 45, 9, 1
Offset: 0

Views

Author

Stefano Spezia, Jul 29 2024

Keywords

Comments

A ballotlike path is a lattice path in the 1st quadrant starting at (0, 0) and ending at (n, k) which uses the steps U = (1, 1), D = (1, -1), u = (1, 0) (for upstairs or umber) and d = (1, 0) (for downstairs or denim), subject to the conditions that the umber horizontal steps do not occur at height zero and the denim horizontal steps do not occur before the first down step. See pp. 8-10 in Lazar and Linusson.

Examples

			Triangle begins:
    0;
    0,   1;
    1,   1,   1;
    2,   3,   2,   1;
    5,   9,   6,   3,  1;
   14,  28,  21,  10,  4,  1;
   42,  90,  76,  39, 15,  5, 1;
  132, 297, 276, 159, 64, 21, 6, 1;
  ...
		

Crossrefs

Cf. A000108, A026013, A057427 (diagonal), A071724, A375086 (row sums).

Programs

  • Mathematica
    T[n_,k_]:=Binomial[2n-2,n-k-1]-Binomial[2n-2,n-k-2]+Binomial[n-2,n-k]; Table[T[n,k],{n,0,10},{k,0,n}]//Flatten
  • Python
    from math import isqrt
    from sympy import binomial
    def A375085(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        b = n-binomial(a+1,2)
        return int(binomial(c:=a-1<<1,d:=a-b-1)-binomial(c,d-1)+binomial(a-2,d+1)) if n else 0 # Chai Wah Wu, Nov 14 2024

Formula

T(n,k) = binomial(2*n-2,n-k-1) - binomial(2*n-2,n-k-2) + binomial(n-2,n-k).
T(n,0) = A000108(n-1).
T(n,1) = A071724(n-1) for n > 0.
T(n+1,2) - T(n,2) = A026013(n-1) for n > 2.

A100537 Triangle read by rows: T(n,k) is the number of Dyck n-paths whose first descent has length k.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 9, 3, 1, 1, 28, 9, 3, 1, 1, 90, 28, 9, 3, 1, 1, 297, 90, 28, 9, 3, 1, 1, 1001, 297, 90, 28, 9, 3, 1, 1, 3432, 1001, 297, 90, 28, 9, 3, 1, 1, 11934, 3432, 1001, 297, 90, 28, 9, 3, 1, 1, 41990, 11934, 3432, 1001, 297, 90, 28, 9, 3, 1, 1, 149226, 41990, 11934, 3432, 1001, 297, 90, 28, 9, 3, 1, 1
Offset: 1

Views

Author

David Callan, Nov 27 2004

Keywords

Comments

T(n,k) has several other interpretations in terms of Dyck n-paths: besides counting them by length k of first descent, it also counts them by (i) number of UDs with which path begins, (ii) height of lowest valley point, (iii) number of upsteps immediately following the last ascending valley point, (iv) number of consecutive UDs starting at the end of the last long ascent.
A valley point is a path vertex that's preceded by a downstep and followed by an upstep. Starting at the origin (treated as a valley point), scan the valley points left to right as long as their ordinates are weakly increasing to obtain the last ascending valley point.
For example, the valley points in UDUUDUduDDUUUDUDDD have ordinates 0,1,1,0,2 and so the last ascending one is the third (in small type) and k=1 in (iii).
A long ascent is one consisting of 2 or more upsteps and for this purpose an upstep is prepended to the path to ensure at least one long ascent. For example, UUDDUUUDUDDD has 2 long ascents and the last one continues as UUUDUD..., so (iv) has k=2 consecutive UDs.
These results all follow from a consideration of the effect of combinations of the involutions R and phi on Dyck paths where R is path reversal and phi is Deutsch's involution defined recursively by phi({}) = {}, phi(U P D Q) = U phi(Q) D phi(P) with P,Q Dyck paths.
Essentially, Riordan array (f(x), x) where f(x) is the g.f. of A071724. - Philippe Deléham, Feb 07 2014

Examples

			Table begins
  * k..1...2...3......
  n
  1 |..1
  2 |..1...1
  3 |..3...1...1
  4 |..9...3...1...1
  5 |.28...9...3...1...1
  6 |.90..28...9...3...1...1
  7 |297..90..28...9...3...1...1
For example, UUDDUD has first descent of length 2 and T(3,1)=3 counts UUDUDD, UDUUDD, UDUDUD.
		

Crossrefs

Row sums are the Catalan numbers A000108.
Each column is A071724.

Programs

  • Magma
    A100537:= func< n,k | k eq n select 1 else 3*(n-k)*Catalan(n-k)/(n-k+2) >;
    [A100537(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 03 2021
    
  • Mathematica
    T[n_, k_]:= Boole[k==n] + 3*(n-k)*CatalanNumber[n-k]/(n-k+2);
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 03 2021 *)
  • Sage
    def A100537(n,k): return bool(k==n) + 3*(n-k)*catalan_number(n-k)/(n-k+2)
    flatten([[A100537(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 03 2021

Formula

T(n, k) = Cat(n-k) - Cat(n-k-1) where (Cat(n))_{n>=0} = (1, 2, 5, 14, ...) is the convolution of the Catalan numbers A000108 with itself.
G.f.: (1-x)*y*(1 - 2*x - sqrt(1-4*x))/(2*x*(1 - x*y)).
T(n, k) = 3*(n-k)*C(n-k)/(n-k+2) + [k=n], where C(n) = A000108(n). - G. C. Greubel, May 03 2021
Previous Showing 11-20 of 23 results. Next