%I #19 Oct 24 2021 05:38:00
%S 1,2,6,16,45,132,399,1240,3951,12870,42746,144420,495300,1721202,
%T 6051150,21493136,77039070,278377452,1013187920,3711505380,
%U 13675028346,50649452084,188482525039,704409735912,2642825539375,9950643710800,37587291143103,142403408032648
%N Total number of nodes summed over all lattice paths from (0,0) to (n,0) that do not go below the x-axis, and at (x,y) only allow steps (1,v) with v in {-1,0,1,...,y+1}.
%H Alois P. Heinz, <a href="/A333070/b333070.txt">Table of n, a(n) for n = 0..1000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Motzkin_number">Motzkin number</a>
%F a(n) = (n+1) * A333069(n).
%F a(n) ~ c * 4^n / sqrt(n), where c = 0.0131789402414023971902275212293294628834887666310830183578424168829... - _Vaclav Kotesovec_, Oct 24 2021
%p b:= proc(x, y) option remember; `if`(x=0, 1, add(
%p `if`(x+j>y, b(x-1, y-j), 0), j=-1-y..min(1, y)))
%p end:
%p a:= n-> (n+1)*b(n, 0):
%p seq(a(n), n=0..30);
%t b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[
%t If[x + j > y, b[x - 1, y - j], 0], {j, -1 - y, Min[1, y]}]];
%t a[n_] := (n+1) b[n, 0];
%t a /@ Range[0, 30] (* _Jean-François Alcover_, Apr 05 2021, after _Alois P. Heinz_ *)
%Y Cf. A333069, A333071, A333106, A333504.
%K nonn
%O 0,2
%A _Alois P. Heinz_, Mar 06 2020