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

A287987 Number of Dyck paths of semilength n such that all positive levels have the same number of peaks.

Original entry on oeis.org

1, 1, 1, 3, 1, 8, 13, 13, 54, 132, 280, 547, 1219, 3904, 11107, 25082, 53777, 137751, 419831, 1257599, 3453557, 8911341, 22636845, 59890162, 172264224, 529706648, 1630328686, 4765347773, 13125989799, 35253234315, 97531470556, 287880507391, 894915519516
Offset: 0

Views

Author

Alois P. Heinz, Jun 03 2017

Keywords

Examples

			. a(3) = 3:                         /\        /\
.                    /\/\/\      /\/  \      /  \/\  .
.
. a(5) = 8:
.                       /\/\      /\/\      /\/\
.      /\/\/\/\/\  /\/\/    \  /\/    \/\  /    \/\/\
.
.            /\        /\          /\        /\
.         /\/  \      /  \/\    /\/  \      /  \/\
.      /\/      \  /\/      \  /      \/\  /      \/\  .
		

Crossrefs

Programs

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

A287843 Number of Dyck paths of semilength n such that each level with peaks has exactly two peaks.

Original entry on oeis.org

1, 0, 1, 1, 2, 5, 15, 27, 76, 196, 548, 1388, 3621, 9894, 27553, 75346, 205634, 563729, 1565409, 4370226, 12191929, 33980329, 94874987, 265668404, 745652478, 2095025688, 5889310438, 16565399257, 46633521554, 131388795335, 370434641340, 1044917168292
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2017

Keywords

Examples

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

Crossrefs

Column k=2 of A288108.

Programs

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

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

Original entry on oeis.org

1, 1, 1, 2, 5, 10, 28, 71, 194, 532, 1495, 4256, 12176, 35251, 102664, 300260, 881909, 2599948, 7688164, 22788527, 67676144, 201308938, 599676445, 1788564038, 5339905904, 15956230705, 47713265536, 142763240666, 427390085963, 1280058256294, 3835332884686
Offset: 0

Views

Author

Alois P. Heinz, Jun 03 2017

Keywords

Examples

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

Crossrefs

Programs

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