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.
%I A258309 #15 May 04 2017 08:23:46 %S A258309 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 A258309 16,69,151,255,127,1,1,8,19,101,261,703,911,323,1,1,9,22,139,401,1485, %U A258309 2983,3535,835,1,1,10,25,183,571,2691,6973,14977,13903,2188 %N 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. %H A258309 Alois P. Heinz, <a href="/A258309/b258309.txt">Antidiagonals n = 0..140, flattened</a> %H A258309 Wikipedia, <a href="https://en.wikipedia.org/wiki/Motzkin_number">Motzkin number</a> %F A258309 A(n,k) = Sum_{i=0..min(floor(n/2),k)} C(k,i) * i! * A258310(n,i). %e A258309 Square array A(n,k) begins: %e A258309 : 1, 1, 1, 1, 1, 1, 1, ... %e A258309 : 1, 1, 1, 1, 1, 1, 1, ... %e A258309 : 2, 3, 4, 5, 6, 7, 8, ... %e A258309 : 4, 7, 10, 13, 16, 19, 22, ... %e A258309 : 9, 23, 43, 69, 101, 139, 183, ... %e A258309 : 21, 71, 151, 261, 401, 571, 771, ... %e A258309 : 51, 255, 703, 1485, 2691, 4411, 6735, ... %p A258309 b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0, %p A258309 `if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (k*x+y)/y, 1) %p A258309 +b(x-1, y, false, k) +b(x-1, y+1, true, k))) %p A258309 end: %p A258309 A:= (n, k)-> b(n, 0, false, k): %p A258309 seq(seq(A(n, d-n), n=0..d), d=0..12); %t A258309 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 A258309 A[n_, k_] := b[n, 0, False, k]; %t A258309 Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, May 04 2017, translated from Maple *) %Y A258309 Columns k=0-1 give: A001006, A140456(n+2). %Y A258309 Main diagonal gives A261785. %Y A258309 Cf. A258306, A258310. %K A258309 nonn,tabl %O A258309 0,6 %A A258309 _Alois P. Heinz_, May 25 2015