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!)
A258312 Sum over all Motzkin paths of length n of products over all peaks p of x_p/y_p, where x_p and y_p are the coordinates of peak p. 3

%I #14 Jun 10 2017 10:32:01

%S 1,1,2,5,14,43,141,490,1785,6789,26809,109632,462755,2012441,8997402,

%T 41297927,194306557,936082502,4612095475,23219012907,119328025012,

%U 625545408219,3342370197206,18190297736313,100768960522871,567886743369378,3253833477309093

%N Sum over all Motzkin paths of length n of products over all peaks p of x_p/y_p, where x_p and y_p are the coordinates of peak p.

%H Alois P. Heinz, <a href="/A258312/b258312.txt">Table of n, a(n) for n = 0..800</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Motzkin_number">Motzkin number</a>

%p b:= proc(x, y, t) option remember; `if`(y>x or y<0, 0,

%p `if`(x=0, 1, b(x-1, y-1, false) *`if`(t, x/y, 1)

%p +b(x-1, y, false)+b(x-1, y+1, true)))

%p end:

%p a:= n-> b(n, 0, false):

%p seq(a(n), n=0..30);

%t b[x_, y_, t_] := b[x, y, t] = If[y>x || y<0, 0, If[x == 0, 1, b[x-1, y-1, False]*If[t, x/y, 1] + b[x-1, y, False] + b[x-1, y+1, True]]];

%t a[n_] := b[n, 0, False];

%t Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Jun 10 2017, translated from Maple *)

%Y Column k=0 of A258306 and A258307.

%K nonn

%O 0,3

%A _Alois P. Heinz_, May 25 2015

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 May 5 16:56 EDT 2024. Contains 372276 sequences. (Running on oeis4.)