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

A288387 Number T(n,k) of Dyck paths of semilength n such that the minimal number of peaks over all positive levels equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 8, 5, 0, 0, 1, 25, 13, 3, 0, 0, 1, 83, 35, 13, 0, 0, 0, 1, 282, 112, 30, 4, 0, 0, 0, 1, 971, 368, 61, 29, 0, 0, 0, 0, 1, 3386, 1208, 172, 90, 5, 0, 0, 0, 0, 1, 11940, 3992, 619, 188, 56, 0, 0, 0, 0, 0, 1, 42504, 13449, 2241, 345, 240, 6, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 08 2017

Keywords

Comments

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

Examples

			. T(4,1) = 5:
.              /\      /\        /\/\    /\        /\/\
.         /\/\/  \  /\/  \/\  /\/    \  /  \/\/\  /    \/\ .
.
Triangle T(n,k) begins:
:    1;
:    0,    1;
:    1,    0,   1;
:    2,    2,   0,  1;
:    8,    5,   0,  0, 1;
:   25,   13,   3,  0, 0, 1;
:   83,   35,  13,  0, 0, 0, 1;
:  282,  112,  30,  4, 0, 0, 0, 1;
:  971,  368,  61, 29, 0, 0, 0, 0, 1;
: 3386, 1208, 172, 90, 5, 0, 0, 0, 0, 1;
		

Crossrefs

Row sums give A000108.
Main diagonal and first lower diagonal give: A000012, A000004.

Programs

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

Formula

T(0,0) = 1, T(n,k) = A288386(n,k) - A288386(n,k+1).
T(2n,n-1) = A218152(n) for n>1.
T(2n,n) = A000007(n).
T(2n+1,n) = A000027(n+1) for n>0.

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

Original entry on oeis.org

1, 1, 1, 3, 6, 17, 49, 147, 459, 1476, 4856, 16282, 55466, 191474, 668510, 2356944, 8380944, 30025814, 108289093, 392871484, 1432934360, 5251507624, 19329771911, 71430479820, 264914270527, 985737417231, 3679051573264, 13769781928768, 51670641652576
Offset: 0

Views

Author

Alois P. Heinz, Jun 02 2017

Keywords

Examples

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

Crossrefs

Column k=1 of A288386.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 1, j], {j, n}]];Table[a[n], {n, 0, 30}] (* Indranil Ghosh, Aug 09 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 1, j) for j in range(1, n + 1)])
    print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 09 2017

A288678 Number of Dyck paths of semilength n such that no positive level has fewer than two peaks.

Original entry on oeis.org

1, 0, 1, 1, 1, 4, 14, 35, 91, 268, 864, 2833, 9279, 30670, 102975, 351148, 1212886, 4232714, 14900843, 52865511, 188871400, 679029570, 2455099043, 8922220725, 32576194260, 119447959183, 439700905503, 1624436294053, 6021371511844, 22388679839583, 83484414608203
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=2 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 2, j], {j, 2, n}]];Table[a[n], {n, 0, 30}] (* Indranil Ghosh, Aug 09 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum(sum(binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i))*b(n - j, k, i) for i in range(1, n - j + 1))
    def a(n): return 1 if n==0 else sum(b(n, 2, j) for j in range(2, n + 1))
    print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 09 2017

A288679 Number of Dyck paths of semilength n such that no positive level has fewer than three peaks.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 5, 30, 96, 245, 592, 1543, 4884, 17660, 64495, 226442, 766937, 2558655, 8590293, 29408344, 102893203, 366035420, 1314955687, 4747101946, 17184305311, 62359953380, 226978626707, 829122987011, 3040369502702, 11191473790567, 41342469523031
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=3 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 3, j], {j, 3, n}]];Table[a[n], {n, 0, 35}] (* Indranil Ghosh, Aug 09 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 3, j) for j in range(3, n + 1)])
    print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 09 2017

A288680 Number of Dyck paths of semilength n such that no positive level has fewer than four peaks.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 6, 57, 247, 718, 1795, 4210, 9969, 27596, 98507, 402924, 1626525, 6142611, 21729644, 73308577, 241270869, 793679894, 2666563900, 9263663359, 33259282181, 122178034000, 453573262015, 1685632454779, 6240174176549, 22987207140830
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=4 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 4, j], {j, 4, n}]];Table[a[n], {n, 0, 35}] (* Indranil Ghosh, Aug 09 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 4, j) for j in range(4, n + 1)])
    print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 09 2017

A288681 Number of Dyck paths of semilength n such that no positive level has fewer than five peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 7, 98, 575, 2009, 5468, 13365, 30910, 70156, 170830, 531334, 2203895, 10091063, 44034478, 176213307, 650957418, 2258314543, 7491190627, 24204620623, 77794583961, 254583038843, 865776314524, 3087754003802, 11479621448305
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=5 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 5, j], {j, 5, n}]]; Table[a[n], {n, 0, 35}] (* Indranil Ghosh, Aug 10 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 5, j) for j in range(5, n + 1)])
    print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 10 2017

A288682 Number of Dyck paths of semilength n such that no positive level has fewer than six peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 8, 156, 1213, 5232, 16091, 41834, 100320, 229851, 513699, 1166304, 3068322, 11294356, 54431307, 271824026, 1253186445, 5233138157, 20031588131, 71538367677, 242280234545, 789260222205, 2507719402158, 7900354628357
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=6 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 6, j], {j, 6, n}]]; Table[a[n], {n, 0, 35}] (* Indranil Ghosh, Aug 10 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 6, j) for j in range(6, n + 1)])
    print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 10 2017

A288683 Number of Dyck paths of semilength n such that no positive level has fewer than seven peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 234, 2350, 12567, 44971, 127475, 320491, 756677, 1720610, 3821223, 8436508, 19793620, 59810128, 268048977, 1458971589, 7720465569, 36927931597, 159094351283, 626621217546, 2296016964863, 7949275945740
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=7 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 7, j], {j, 7, n}]]; Table[a[n], {n, 0, 35}] (* Indranil Ghosh, Aug 10 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 7, j) for j in range(7, n + 1)])
    print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 10 2017

A288684 Number of Dyck paths of semilength n such that no positive level has fewer than eight peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 335, 4241, 27915, 117971, 373845, 1002089, 2456082, 5725439, 12935530, 28622833, 62588817, 139046970, 353173119, 1305216091, 7035422989, 41539474198, 227550374938, 1115122502718, 4917988882292
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=8 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 8, j], {j, 8, n}]]; Table[a[n], {n, 0, 40}] (* Indranil Ghosh, Aug 10 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 8, j) for j in range(8, n + 1)])
    print([a(n) for n in range(41)]) # Indranil Ghosh, Aug 10 2017

A288685 Number of Dyck paths of semilength n such that no positive level has fewer than nine peaks.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 462, 7217, 57783, 289400, 1043781, 3042593, 7833174, 18821247, 43417043, 97550980, 215243289, 469069428, 1020806036, 2342090587, 6886047798, 32238887181, 199504672863, 1232775909721, 6881782444707
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2017

Keywords

Crossrefs

Column k=9 of A288386.
Cf. A000108.

Programs

  • Mathematica
    b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]];  a[n_]:=If[n==0, 1, Sum[b[n, 9, j], {j, 9, n}]]; Table[a[n], {n, 0, 40}] (* Indranil Ghosh, Aug 10 2017 *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])
    def a(n): return 1 if n==0 else sum([b(n, 9, j) for j in range(9, n + 1)])
    print([a(n) for n in range(41)]) # Indranil Ghosh, Aug 10 2017
Showing 1-10 of 11 results. Next