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!)
A258309 A(n,k) is the sum over all Motzkin paths of length n of products over all peaks p of (k*x_p+y_p)/y_p, where x_p and y_p are the coordinates of peak p; square array A(n,k), n>=0, k>=0, read by antidiagonals. 4

%I #15 May 04 2017 08:23:46

%S 1,1,1,1,1,2,1,1,3,4,1,1,4,7,9,1,1,5,10,23,21,1,1,6,13,43,71,51,1,1,7,

%T 16,69,151,255,127,1,1,8,19,101,261,703,911,323,1,1,9,22,139,401,1485,

%U 2983,3535,835,1,1,10,25,183,571,2691,6973,14977,13903,2188

%N A(n,k) is the sum over all Motzkin paths of length n of products over all peaks p of (k*x_p+y_p)/y_p, where x_p and y_p are the coordinates of peak p; square array A(n,k), n>=0, k>=0, read by antidiagonals.

%H Alois P. Heinz, <a href="/A258309/b258309.txt">Antidiagonals n = 0..140, flattened</a>

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

%F A(n,k) = Sum_{i=0..min(floor(n/2),k)} C(k,i) * i! * A258310(n,i).

%e Square array A(n,k) begins:

%e : 1, 1, 1, 1, 1, 1, 1, ...

%e : 1, 1, 1, 1, 1, 1, 1, ...

%e : 2, 3, 4, 5, 6, 7, 8, ...

%e : 4, 7, 10, 13, 16, 19, 22, ...

%e : 9, 23, 43, 69, 101, 139, 183, ...

%e : 21, 71, 151, 261, 401, 571, 771, ...

%e : 51, 255, 703, 1485, 2691, 4411, 6735, ...

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

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

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

%p end:

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

%p seq(seq(A(n, d-n), n=0..d), d=0..12);

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

%t A[n_, k_] := b[n, 0, False, k];

%t Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, May 04 2017, translated from Maple *)

%Y Columns k=0-1 give: A001006, A140456(n+2).

%Y Main diagonal gives A261785.

%Y Cf. A258306, A258310.

%K nonn,tabl

%O 0,6

%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 April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)