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

A152880 Number of Dyck paths of semilength n having exactly one peak of maximum height.

Original entry on oeis.org

1, 1, 3, 8, 23, 71, 229, 759, 2566, 8817, 30717, 108278, 385509, 1384262, 5006925, 18225400, 66711769, 245400354, 906711758, 3363516354, 12522302087, 46773419089, 175232388955, 658295899526, 2479268126762, 9359152696924, 35406650450001, 134215036793130
Offset: 1

Views

Author

Emeric Deutsch, Jan 02 2009

Keywords

Comments

Also number of peaks of maximum height in all Dyck paths of semilength n-1. Example: a(3)=3 because in (UD)(UD) and U(UD)D we have three peaks of maximum height (shown between parentheses).

Examples

			a(3)=3 because we have UU(UD)DD, UDU(UD)D, U(UD)DUD, where U=(1,1), D=(1,-1), with the peak of maximum height shown between parentheses; the path UUDUDD does not qualify because it has two peaks of maximum height.
		

Crossrefs

Column k=1 of A371928.

Programs

  • Maple
    f[0] := 1: f[1] := 1: for i from 2 to 35 do f[i] := sort(expand(f[i-1]-z*f[i-2])) end do; g := sum(z^j/f[j]^2, j = 1 .. 34): gser := series(g, z = 0, 30): seq(coeff(gser, z, n), n = 1 .. 27);
    # second Maple program:
    b:= proc(x, y, h, c) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, c, add(b(x-1, y-i, max(h, y), `if`(h=y, 0,
         `if`(h b(2*n, 0$3):
    seq(a(n), n=1..28);  # Alois P. Heinz, Jul 25 2023
  • Mathematica
    b[x_, y_, h_, c_] := b[x, y, h, c] = If[y<0 || y>x, 0, If[x==0, c, Sum[b[x-1, y-i, Max[h, y], If[h==y, 0, If[hJean-François Alcover, Sep 17 2024, after Alois P. Heinz *)

Formula

G.f.: g(z) = Sum_{j>=1} z^j/f(j)^2, where the f(j)'s are the Fibonacci polynomials (in z) defined by f(0)=f(1)=1, f(j)=f(j-1)-zf(j-2), j>=2.
a(n) = A152879(n,1).
a(n) = Sum_{k=1..n} k*A152879(n-1,k).

A364030 Number of Dyck paths of semilength 2n having exactly n peaks of maximal height.

Original entry on oeis.org

1, 1, 4, 17, 78, 382, 1975, 10663, 59526, 340802, 1988575, 11771619, 70465201, 425572175, 2589083577, 15849320663, 97548380006, 603277351699, 3747168602548, 23367880883262, 146262143795248, 918597886652632, 5787577778959613, 36572319110701681, 231742772456205071
Offset: 0

Views

Author

Alois P. Heinz, Jul 25 2023

Keywords

Examples

			a(0) = 1: (), the empty Dyck path.
a(1) = 1: //^\\.
a(2) = 4: ///^\/^\\\, //^\\//^\\, //^\/^\\/\, /\//^\/^\\.
		

Crossrefs

Formula

a(n) = A152879(2n,n).

A364386 Triangle T(n,k) read by rows: the number of Motzkin paths of length n that have k nodes at their peak level, 1 <= k <= n+1.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 7, 4, 1, 0, 1, 18, 15, 11, 5, 1, 0, 1, 44, 33, 26, 16, 6, 1, 0, 1, 113, 78, 59, 42, 22, 7, 1, 0, 1, 296, 197, 138, 101, 64, 29, 8, 1, 0, 1, 782, 518, 342, 240, 165, 93, 37, 9, 1, 0, 1, 2076, 1388, 892, 590, 406, 258, 130, 46, 10, 1, 0, 1
Offset: 0

Views

Author

R. J. Mathar, Jul 21 2023

Keywords

Examples

			Example for 9 paths of length n=4: UUDD (k=1 at level 2), UHHD (k=3 at level 1), UHDH (k=2 at level 1), UDUD (k=2 at level 1), UDHH (k=1 at level 1), HUHD (k=2 at level 1), HUDH (k=1 at level 1), HHUD (k=1 at level 1), HHHH (k=5 at level 0). So k=1 appears 4 times, k=2 3 times, k=3 once, k=4 never, k=5 once.
The triangle starts:
      1
      0,     1
      1,     0,    1
      2,     1,    0,    1
      4,     3,    1,    0,    1
      8,     7,    4,    1,    0,    1
     18,    15,   11,    5,    1,    0,    1
     44,    33,   26,   16,    6,    1,    0,   1
    113,    78,   59,   42,   22,    7,    1,   0,   1
    296,   197,  138,  101,   64,   29,    8,   1,   0,  1
    782,   518,  342,  240,  165,   93,   37,   9,   1,  0,  1
   2076,  1388,  892,  590,  406,  258,  130,  46,  10,  1,  0, 1
   5538,  3747, 2401, 1522, 1005,  665,  388, 176,  56, 11,  1, 0, 1
  14856, 10147, 6560, 4085, 2576, 1680, 1054, 564, 232, 67, 12, 1, 0, 1
  ...
		

Crossrefs

Cf. A001006 (row sums), A088457 (column k=1).
Cf. A152879 (equivalent for Dyck paths).

Formula

T(n,n) = 1. (All nodes on level 0, only H steps.)
T(n,n-1) = 0.
T(n,n-2) = 1. (steps UHHH...HHHD)
Showing 1-3 of 3 results.