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

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

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 5, 2, 1, 1, 0, 13, 5, 3, 1, 1, 0, 31, 15, 4, 4, 1, 1, 0, 71, 27, 10, 7, 5, 1, 1, 0, 181, 76, 36, 11, 11, 6, 1, 1, 0, 447, 196, 83, 22, 19, 16, 7, 1, 1, 0, 1111, 548, 225, 81, 32, 31, 22, 8, 1, 1, 0, 2799, 1388, 573, 235, 60, 56, 48, 29, 9, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 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,2) = 5:                                        /\/\
.                                       /\  /\      /    \
.      /\/\      /\/\      /\/\        /  \/  \    /      \
. /\/\/    \  /\/    \/\  /    \/\/\  /        \  /        \ .
.
. T(5,3) = 3:
.                                       /\/\/\
.              /\  /\/\    /\/\  /\    /      \
.             /  \/    \  /    \/  \  /        \ .
.
Triangle T(n,k) begins:
  1;
  0,   1;
  0,   1,  1;
  0,   3,  1,  1;
  0,   5,  2,  1,  1;
  0,  13,  5,  3,  1,  1;
  0,  31, 15,  4,  4,  1, 1;
  0,  71, 27, 10,  7,  5, 1, 1;
  0, 181, 76, 36, 11, 11, 6, 1, 1;
		

Crossrefs

Row sums give A288109.
T(2n,n) gives A156043.

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:
    T:= (n, k)-> 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[j - 1, i - 1] + Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];
    T[n_, k_] := 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 *)

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

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

A288940 Number of Dyck paths having n (positive) levels and exactly n peaks per level.

Original entry on oeis.org

1, 1, 9, 27076, 147556480375, 4711342006036190504484, 2162932174406679548553402518043252929, 29605698225102450501737027784037791564430800582087459328, 22346336234943531646124131709622442581521043809236751640919325993842966011809319
Offset: 0

Views

Author

Alois P. Heinz, Jun 19 2017

Keywords

Comments

The semilengths of Dyck paths counted by a(n) are elements of the integer interval [n^2+n-1, n^2*(n+1)/2] for n>0.

Examples

			. a(1) = 1:       /\  .
.
. a(2) = 9:           /\/\        /\/\        /\/\             /\  /\
.                /\/\/    \    /\/    \/\    /    \/\/\   /\/\/  \/  \
.
.    /\    /\      /\  /\      /\      /\    /\    /\      /\  /\
. /\/  \/\/  \  /\/  \/  \/\  /  \/\/\/  \  /  \/\/  \/\  /  \/  \/\/\ .
		

Crossrefs

Main diagonal of A288972.
Cf. A288318.

Programs

  • Maple
    b:= proc(n, k, j, v) option remember; `if`(n=j, `if`(v=1, 1, 0),
          `if`(v<2, 0, add(b(n-j, k, i, v-1)*(binomial(i, k)
           *binomial(j-1, i-1-k)), i=1..min(j+k, n-j))))
        end:
    a:= n-> `if`(n=0, 1, add(b(k, n$3), k=n^2+n-1..n^2*(n+1)/2)):
    seq(a(n), n=0..7);
  • Mathematica
    b[n_, k_, j_, v_]:=b[n, k, j, v]=If[n==j, If[v==1, 1, 0], If[v<2, 0, Sum[b[n - j, k, i, v - 1] Binomial[i, k] Binomial[j - 1, i - 1 - k], {i, Min[j + k, n - j]}]]]; a[n_]:=If[n==0, 1, Sum[b[k, n, n, n], {k, n^2 + n - 1, n^2*(n + 1)/2}]]; Table[a[n], {n, 0, 8}] (* Indranil Ghosh, Jul 06 2017, after Maple code *)

A288319 Number of Dyck paths of semilength n such that each positive level has exactly three peaks.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 4, 20, 20, 0, 16, 200, 1120, 3540, 6864, 9400, 18240, 82000, 364256, 1255040, 3448400, 8094400, 18653984, 50789120, 166596240, 565558400, 1791310496, 5202559520, 14279014880, 39040502400, 111437733184, 335085082880, 1032287357600
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Examples

			. a(7) = 4:
.           /\/\/\        /\/\/\        /\/\/\        /\/\/\
.    /\/\/\/      \  /\/\/      \/\  /\/      \/\/\  /      \/\/\/\ .
		

Crossrefs

Column k=3 of A288318.
Cf. A000108.

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:
    a:= n-> `if`(n=0, 1, b(n, 3$2)):
    seq(a(n), n=0..35);
  • 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]}]];
    a[n_] := If[n == 0, 1, b[n, 3, 3]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

A288320 Number of Dyck paths of semilength n such that each positive level has exactly four peaks.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 5, 45, 105, 70, 0, 25, 525, 4950, 26950, 94605, 226925, 383525, 507000, 1016475, 5047875, 26940475, 117108550, 414703200, 1223146475, 3089625550, 7073320775, 16715232600, 48599763900, 175648700900, 673443954000, 2444611549450
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Crossrefs

Column k=4 of A288318.
Cf. A000108.

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:
    a:= n-> `if`(n=0, 1, b(n, 4$2)):
    seq(a(n), n=0..35);
  • 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]}]];
    a[n_] := If[n == 0, 1, b[n, 4, 4]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

A288321 Number of Dyck paths of semilength n such that each positive level has exactly five peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 6, 84, 336, 504, 252, 0, 36, 1134, 15960, 130536, 700560, 2639952, 7260840, 14894712, 23151996, 29957760, 60579792, 319505760, 1930565232, 9852185196, 41993000532, 151747572312, 471322972512, 1275430904496, 3072333948480
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Crossrefs

Column k=5 of A288318.
Cf. A000108.

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:
    a:= n-> `if`(n=0, 1, b(n, 5$2)):
    seq(a(n), n=0..35);
  • 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]}]];
    a[n_] := If[n == 0, 1, b[n, 5, 5]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

A288322 Number of Dyck paths of semilength n such that each positive level has exactly six peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 140, 840, 2100, 2310, 924, 0, 49, 2156, 42140, 479220, 3598560, 19184676, 75954564, 229873063, 541427264, 1002386336, 1473318476, 1876489398, 3785310858, 20726607804, 136977861097, 786065454860, 3841493284076
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Crossrefs

Column k=6 of A288318.
Cf. A000108.

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:
    a:= n-> `if`(n=0, 1, b(n, 6$2)):
    seq(a(n), n=0..40);
  • 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]}]];
    a[n_] := If[n == 0, 1, b[n, 6, 6]];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

A288323 Number of Dyck paths of semilength n such that each positive level has exactly seven peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 216, 1800, 6600, 11880, 10296, 3432, 0, 64, 3744, 96768, 1454160, 14460480, 102586176, 544817856, 2237725512, 7268659712, 18954982080, 40057015680, 68941928016, 97350892224, 122456030112, 244967552640
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2017

Keywords

Crossrefs

Column k=7 of A288318.
Cf. A000108.

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:
    a:= n-> `if`(n=0, 1, b(n, 7$2)):
    seq(a(n), n=0..40);
  • 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]}]];
    a[n_] := If[n == 0, 1, b[n, 7, 7]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jun 02 2018, from Maple *)
Showing 1-10 of 13 results. Next