OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 18, 96, 1182, 11100, 187680, 2639760, 58768320, ...}.
The row sums of this class of sequences (see cross-references) is given by the following. Let S(n) be the row sum then S(n) = 2*S(n-1) + f(n)*S(n-2) for a given f(n). For this sequence f(n) = (n+1)*(n+2)*(2*n+3)/6 = A000330(n+1). - G. C. Greubel, Mar 02 2021
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = T(n-1, k) + T(n-1, k-1) + ((n+1)*(n+2)*(2*n+3)/6)*T(n-2, k-1) with T(n, 0) = T(n, n) = 1.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 16, 1;
1, 47, 47, 1;
1, 103, 974, 103, 1;
1, 195, 5354, 5354, 195, 1;
1, 336, 19969, 147068, 19969, 336, 1;
1, 541, 60085, 1259253, 1259253, 60085, 541, 1;
1, 827, 156386, 7010503, 44432886, 7010503, 156386, 827, 1;
1, 1213, 365498, 30299614, 536255794, 536255794, 30299614, 365498, 1213, 1;
MAPLE
T:= proc(n, k) option remember;
if k=0 or k=n then 1
else T(n-1, k) + T(n-1, k-1) + ((n+1)*(n+2)*(2*n+3)/6)*T(n-2, k-1)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 02 2021
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, T[n-1, k] + T[n-1, k-1] + ((n+1)*(n+2)*(2*n+3)/6)*T[n-2, k-1]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Mar 02 2021 *)
PROG
(Sage)
def f(n): return (n+1)*(n+2)*(2*n+3)/6
def T(n, k):
if (k==0 or k==n): return 1
else: return T(n-1, k) + T(n-1, k-1) + f(n)*T(n-2, k-1)
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 02 2021
(Magma)
f:= func< n | (n+1)*(n+2)*(2*n+3)/6 >;
function T(n, k)
if k eq 0 or k eq n then return 1;
else return T(n-1, k) + T(n-1, k-1) + f(n)*T(n-2, k-1);
end if; return T;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 02 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Jan 05 2009
EXTENSIONS
Edited by G. C. Greubel, Mar 02 2021
STATUS
approved