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 A258306 #19 Feb 06 2017 14:21:40 %S A258306 1,1,1,1,1,2,1,1,3,5,1,1,4,7,14,1,1,5,9,23,43,1,1,6,11,34,71,141,1,1, %T A258306 7,13,47,105,255,490,1,1,8,15,62,145,411,911,1785,1,1,9,17,79,191,615, %U A258306 1496,3535,6789,1,1,10,19,98,243,873,2269,6169,13903,26809 %N A258306 A(n,k) is the sum over all Motzkin paths of length n of products over all peaks p of (x_p+k*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 A258306 Alois P. Heinz, <a href="/A258306/b258306.txt">Antidiagonals n = 0..140, flattened</a> %H A258306 Wikipedia, <a href="https://en.wikipedia.org/wiki/Motzkin_number">Motzkin number</a> %F A258306 A(n,k) = Sum_{i=0..min(floor(n/2),k)} C(k,i) * i! * A258307(n,i). %e A258306 Square array A(n,k) begins: %e A258306 : 1, 1, 1, 1, 1, 1, 1, ... %e A258306 : 1, 1, 1, 1, 1, 1, 1, ... %e A258306 : 2, 3, 4, 5, 6, 7, 8, ... %e A258306 : 5, 7, 9, 11, 13, 15, 17, ... %e A258306 : 14, 23, 34, 47, 62, 79, 98, ... %e A258306 : 43, 71, 105, 145, 191, 243, 301, ... %e A258306 : 141, 255, 411, 615, 873, 1191, 1575, ... %p A258306 b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0, %p A258306 `if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (x+k*y)/y, 1) %p A258306 +b(x-1, y, false, k) +b(x-1, y+1, true, k))) %p A258306 end: %p A258306 A:= (n, k)-> b(n, 0, false, k): %p A258306 seq(seq(A(n, d-n), n=0..d), d=0..12); %t A258306 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, (x + k*y)/y, 1] + b[x - 1, y, False, k] + b[x - 1, y + 1, True, k]]]; A[n_, k_] := b[n, 0, False, k]; Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* _Jean-François Alcover_, Jan 23 2017, translated from Maple *) %Y A258306 Columns k=0-1 give: A258312, A140456(n+2). %Y A258306 Main diagonal gives A266386. %Y A258306 Cf. A258307, A258309. %K A258306 nonn,tabl %O A258306 0,6 %A A258306 _Alois P. Heinz_, May 25 2015