OFFSET
0,4
FORMULA
a(n,k) = Sum_{i=0..n-k} binomial(i+k,k)*trinomial(i+k,n-k-i), where trinomial(n,k) are the trinomial coefficients (A027907).
Recurrence: a(n+3,k+1) = a(n+2,k+1) + a(n+2,k) + a(n+1,k+1) + a(n+1,k) + a(n,k+1) + a(n,k)
EXAMPLE
Triangle begins:
1
1,1
2,3,1
4,8,5,1
7,19,18,7,1
13,43,54,32,9,1
24,94,147,117,50,11,1
44,200,375,375,216,72,13,1
81,418,913,1100,799,359,98,15,1
MATHEMATICA
(* Function RiordanSquare defined in A321620. *)
RiordanSquare[1/(1 - x - x^2- x^3), 11] // Flatten (* Peter Luschny, Nov 27 2018 *)
PROG
(Maxima) trinomial(n, k):=coeff(expand((1+x+x^2)^n), x, k);
create_list(sum(binomial(i+k, k)*trinomial(i+k, n-k-i), i, 0, n-k), n, 0, 8, k, 0, n);
CROSSREFS
KEYWORD
AUTHOR
Emanuele Munarini, Mar 15 2011
STATUS
approved