%I #23 Oct 08 2022 06:08:01
%S 1,0,1,0,1,1,0,2,2,1,0,4,5,3,1,0,9,12,9,4,1,0,21,30,25,14,5,1,0,51,76,
%T 69,44,20,6,1,0,127,196,189,133,70,27,7,1,0,323,512,518,392,230,104,
%U 35,8,1,0,835,1353,1422,1140,726,369,147,44,9,1
%N Riordan array (1, (1 - x - sqrt(1 - 2*x - 3*x^2)) / (2*x)), a Riordan array for directed animals. Triangle read by rows.
%C Also the convolution triangle of the Motzkin numbers A001006. - _Peter Luschny_, Oct 08 2022
%F Inverse of Riordan array (1, x / (1 + x + x^2)).
%F T(n+1, k+1) = A064189(n, k). - _Philippe Deléham_, Apr 21 2007
%F Riordan array (1, x*m(x)) where m(x) is the g.f. of Motzkin numbers (A001006). - _Philippe Deléham_, Nov 04 2009
%e Triangle begins:
%e [0] 1;
%e [1] 0, 1;
%e [2] 0, 1, 1;
%e [3] 0, 2, 2, 1;
%e [4] 0, 4, 5, 3, 1;
%e [5] 0, 9, 12, 9, 4, 1;
%e [6] 0, 21, 30, 25, 14, 5, 1;
%e [7] 0, 51, 76, 69, 44, 20, 6, 1;
%e [8] 0, 127, 196, 189, 133, 70, 27, 7, 1;
%e [9] 0, 323, 512, 518, 392, 230, 104, 35, 8, 1.
%p T := proc(n,k) option remember;
%p if k=0 then return 0^n fi; if k>n then return 0 fi;
%p T(n-1,k-1) + T(n-1,k) + T(n-1,k+1) end:
%p for n from 0 to 9 do seq(T(n,k), k=0..n) od; # _Peter Luschny_, Aug 17 2016
%p # Uses function PMatrix from A357368.
%p PMatrix(10, n -> simplify(hypergeom([1 -n/2, -n/2+1/2], [2], 4))); # _Peter Luschny_, Oct 08 2022
%t T[n_, n_] = 1; T[_, 0] = 0; T[n_, k_] /; 0<k<n := T[n, k] =T[n-1, k-1] + T[n-1, k] + T[n-1, k+1]; T[_, _] = 0;
%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* _Jean-François Alcover_, Jun 13 2019 *)
%o (Sage) # uses[riordan_array from A256893]
%o riordan_array(1, (1-x-sqrt(1-2*x-3*x^2))/(2*x), 11) # _Peter Luschny_, Aug 17 2016
%Y Row sums are A005773, number of directed animals of size n.
%Y Product of A007318 and this sequence is A122897.
%Y Cf. A001006, A007318, A064189.
%K easy,nonn,tabl
%O 0,8
%A _Paul Barry_, Sep 18 2006