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 A261785 #14 Jun 10 2017 10:31:11 %S A261785 1,1,4,13,101,571,6735,54713,873019,9274471,187278048,2460190261, %T A261785 60205154959,942541045811,27121249048036,492972449490417, %U A261785 16312991079531595,337650093459084079,12633283010644517490,293339323822142071021,12245145846336974734339 %N A261785 Sum over all Motzkin paths of length n of products over all peaks p of (n*x_p+y_p)/y_p, where x_p and y_p are the coordinates of peak p. %H A261785 Alois P. Heinz, <a href="/A261785/b261785.txt">Table of n, a(n) for n = 0..400</a> %H A261785 Wikipedia, <a href="https://en.wikipedia.org/wiki/Motzkin_number">Motzkin number</a> %F A261785 a(n) = A258309(n,n). %p A261785 b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0, %p A261785 `if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (k*x+y)/y, 1) %p A261785 +b(x-1, y, false, k) +b(x-1, y+1, true, k))) %p A261785 end: %p A261785 a:= n-> b(n, 0, false, n): %p A261785 seq(a(n), n=0..25); %t A261785 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 A261785 a[n_] := b[n, 0, False, n]; %t A261785 Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Jun 10 2017, translated from Maple *) %Y A261785 Main diagonal of A258309. %K A261785 nonn %O A261785 0,3 %A A261785 _Alois P. Heinz_, Aug 31 2015