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

A288318 Number T(n,k) of Dyck paths of semilength n such that each positive level has exactly k peaks; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 4, 3, 0, 0, 1, 0, 6, 6, 0, 0, 0, 1, 0, 8, 0, 4, 0, 0, 0, 1, 0, 24, 9, 20, 0, 0, 0, 0, 1, 0, 52, 54, 20, 5, 0, 0, 0, 0, 1, 0, 96, 138, 0, 45, 0, 0, 0, 0, 0, 1, 0, 212, 207, 16, 105, 6, 0, 0, 0, 0, 0, 1, 0, 504, 360, 200, 70, 84, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Comments

T(n,k) is defined for all n,k >= 0. The triangle contains only the terms for k<=n. T(0,k) = 1 and T(n,k) = 0 if k > n > 0.

Examples

			. T(5,1) = 4:
.               /\        /\          /\        /\
.            /\/  \      /  \/\    /\/  \      /  \/\
.         /\/      \  /\/      \  /      \/\  /      \/\ .
.
. T(5,2) = 3:
.              /\/\      /\/\      /\/\
.         /\/\/    \  /\/    \/\  /    \/\/\  .
.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  0,  1;
  0,  2,  0,  1;
  0,  0,  0,  0, 1;
  0,  4,  3,  0, 0, 1;
  0,  6,  6,  0, 0, 0, 1;
  0,  8,  0,  4, 0, 0, 0, 1;
  0, 24,  9, 20, 0, 0, 0, 0, 1;
  0, 52, 54, 20, 5, 0, 0, 0, 0, 1;
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k, j) option remember;
         `if`(n=j, 1, add(b(n-j, k, i)*(binomial(i, k)
          *binomial(j-1, i-1-k)), i=1..min(j+k, n-j)))
        end:
    T:= (n, k)-> `if`(n=0, 1, b(n, k$2)):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, k_, j_] := b[n, k, j] = If[n == j, 1, Sum[b[n - j, k, i]*(Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];
    T[n_, k_] := If[n == 0, 1, b[n, k, k]];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 25 2018, translated from Maple *)

Formula

T(n,n) = 1.
T(n+1,n) = 0.
T(2*n+1,n) = (n+1) for n>0.
T(2*n+2,n) = A005564(n+1) for n>1.
T(3*n,n) = A000984(n) = binomial(2*n,n).
T(3*n+1,n) = 0.
T(3*n+2,n) = (n+1)^2 for n>0.

A287846 Number of Dyck paths of semilength n such that each positive level up to the highest nonempty level has exactly one peak.

Original entry on oeis.org

1, 1, 0, 2, 0, 4, 6, 8, 24, 52, 96, 212, 504, 1072, 2352, 5288, 11928, 26800, 60336, 136304, 308928, 701248, 1593120, 3622016, 8245008, 18787360, 42836928, 97724384, 223052784, 509338816, 1163512032, 2658731648, 6077117376, 13893874624, 31771515648
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2017

Keywords

Comments

All terms with n > 1 are even.

Examples

			. a(1) = 1:    /\  .
.
. a(3) = 2:     /\       /\
.            /\/  \     /  \/\  .
.
. a(5) = 4:
.                /\       /\         /\       /\
.             /\/  \     /  \/\   /\/  \     /  \/\
.          /\/      \ /\/      \ /      \/\ /      \/\ .
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j) option remember; `if`(n=j or n=0, 1, add(
           b(n-j, i)*binomial(j-1, i-2)*i, i=1..min(j+2, n-j)))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, j_] := b[n, j] = If[n == j || n == 0, 1, Sum[b[n - j, i]*Binomial[j - 1, i - 2]*i, {i, 1, Min[j + 2, n - j]}]];
    a[n_] := b[n, 1];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 23 2018, translated from Maple *)

A287845 Number of Dyck paths of semilength n such that each positive level up to the highest nonempty level has exactly two peaks.

Original entry on oeis.org

1, 0, 1, 0, 0, 3, 6, 0, 9, 54, 138, 207, 360, 1368, 4545, 11304, 25182, 61605, 173916, 498798, 1347417, 3497328, 9147060, 24630669, 67414590, 184065966, 498495303, 1345622436, 3642036804, 9900361107, 26982011250, 73570082760, 200540053395, 546660151722
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2017

Keywords

Examples

			. a(2) = 1:   /\/\  .
.
. a(5) = 3:
.
.               /\/\     /\/\     /\/\
.          /\/\/    \ /\/    \/\ /    \/\/\ .
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j) option remember;
          `if`(n=j or n=0, 1, add(b(n-j, i)*i*(i-1)/2
           *binomial(j-1, i-3), i=3..min(j+2, n-j)))
        end:
    a:= n-> b(n, 2):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, j_] := b[n, j] = If[n == j || n == 0, 1, Sum[b[n - j, i]*i*(i - 1)/2* Binomial[j - 1, i - 3], {i, 3, Min[j + 2, n - j]}]];
    a[n_] := b[n, 2];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 25 2018, translated from Maple *)

A287993 Number of Dyck paths of semilength n such that all positive levels up to the highest level have a positive number of peaks and all the level peak numbers are distinct.

Original entry on oeis.org

1, 1, 1, 1, 6, 10, 21, 52, 147, 564, 1651, 4440, 12499, 36853, 116476, 390774, 1352215, 4593736, 15057127, 48419013, 156073723, 511324062, 1713185811, 5878350249, 20574046540, 72771206715, 257475113013, 905430711156, 3160767910928, 10981916671027
Offset: 0

Views

Author

Alois P. Heinz, Jun 04 2017

Keywords

Examples

			a(4) = 6:
                     /\      /\      /\          /\/\    /\/\
      /\/\/\/\  /\/\/  \  /\/  \/\  /  \/\/\  /\/    \  /    \/\
		

Crossrefs

Programs

  • Maple
    b:= proc(n, s, j) option remember; `if`(n=j, 1, add(add(
           b(n-j, s union {t}, i)*binomial(i, t)*binomial(j-1, i-1-t),
           t={$max(1, i-j)..min(n-j, i-1)} minus s), i=1..n-j))
        end:
    a:= n-> `if`(n=0, 1, add(b(n, {k}, k), k=1..n)):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, s_, j_] := b[n, s, j] = If[n==j, 1, Sum[Sum[b[n-j, s ~Union~ {t}, i]* Binomial[i, t]*Binomial[j-1, i-1-t], {t, Range[Max[1, i - j], Min[n - j, i - 1]] ~Complement~ s}], {i, 1, n - j}]];
    a[n_] := If[n == 0, 1, Sum[b[n, {k}, k], {k, 1, n}]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 31 2018, from Maple *)

A288109 Number of Dyck paths of semilength n such that all levels with peaks have exactly the same number of peaks.

Original entry on oeis.org

1, 1, 2, 5, 9, 23, 56, 122, 323, 792, 2060, 5199, 13314, 35171, 94077, 249285, 662901, 1775244, 4806724, 13125887, 36107283, 99863241, 276784435, 768288783, 2143763275, 6037486060, 17171063218, 49187617277, 141512589597, 408293870713, 1181084207303
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 2017

Keywords

Crossrefs

Row sums of A288108.

Programs

  • Maple
    b:= proc(n, k, j) option remember; `if`(n=j, 1, add(
          b(n-j, k, i)*(binomial(j-1, i-1)+binomial(i, k)
           *binomial(j-1, i-1-k)), i=1..min(j+k, n-j)))
        end:
    a:= n-> 1 + add(b(n, j$2), j=1..n-1):
    seq(a(n), n=0..33);
  • Mathematica
    b[n_, k_, j_] := b[n, k, j] = If[n==j, 1, Sum[b[n-j, k, i]*(Binomial[j-1, i - 1] + Binomial[i, k]*Binomial[j-1, i-1-k]), {i, 1, Min[j+k, n-j]}]];
    a[n_] := 1 + Sum[b[n, j, j], {j, 1, n - 1}];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, May 31 2018, from Maple *)
Showing 1-5 of 5 results.