login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346194 Total sum of the left-to-right strict peak maxima in all Dyck paths of semilength n. 3
0, 1, 3, 11, 40, 148, 555, 2100, 7997, 30605, 117602, 453421, 1753176, 6795248, 26393431, 102702230, 400277998, 1562292741, 6105426033, 23887275883, 93554945414, 366754396228, 1438986625349, 5650409534767, 22203298031827, 87306238753663, 343511939707274 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Sum of all peak heights in Dyck paths of semilength n is A000302(n-1) for n>0.
Sum of all heights in Dyck paths of semilength n is A008549(n).
LINKS
EXAMPLE
a(3) = 1 + (1+2) + 2 + 2 + 3 = 11:
/\
/\ /\ /\/\ / \
/\/\/\ /\/ \ / \/\ / \ / \ .
MAPLE
b:= proc(x, y, t, h) option remember; `if`(x=0, [1, 0], `if`(y>0,
(p-> p+[0, `if`(t=1, p[1]*h, 0)])(b(x-1, y-1, 0, h)), 0)+
`if`(y<x-1, b(x-1, y+1, `if`(y+1>h, 1, 0), max(h, y+1)), 0))
end:
a:= n-> b(2*n, 0$3)[2]:
seq(a(n), n=0..32);
MATHEMATICA
b[x_, y_, t_, h_] := b[x, y, t, h] = If[x == 0, {1, 0}, If[y > 0,
With[{p = b[x-1, y-1, 0, h]}, p+{0, If[t == 1, p[[1]]*h, 0]}]], {0, 0}]+
If[y < x - 1, b[x-1, y+1, If[y+1 > h, 1, 0], Max[h, y+1]], {0, 0}] /.
Null -> 0;
a[n_] := b[2*n, 0, 0, 0][[2]];
Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Apr 04 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A296221 A371872 A014301 * A346317 A119375 A149063
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 09 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)