OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 7, 20, 46, 92, 160, 224, 160, -448, -28166, ...}.
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
T(n,k,m) = (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1), with m = 3.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 5, 1;
1, 9, 9, 1;
1, 13, 18, 13, 1;
1, 17, 28, 28, 17, 1;
1, 21, 39, 38, 39, 21, 1;
1, 25, 51, 35, 35, 51, 25, 1;
1, 29, 64, 11, -50, 11, 64, 29, 1;
1, 33, 78, -42, -294, -294, -42, 78, 33, 1;
1, 37, 93, -132, -798, -1218, -798, -132, 93, 37, 1;
MAPLE
T:= proc(n, k, m) option remember;
if k=0 and n=0 then 1
else (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1)
fi; end:
seq(seq(T(n, k, 3), k=0..n), n=0..10); # G. C. Greubel, Nov 29 2019
MATHEMATICA
T[n_, k_, m_]:= If[n==0 && k==0, 1, (m*(n-k)+1)*Binomial[n-1, k-1] + (m*k+1)*Binomial[n-1, k] +-m*k*(n-k)*Binomial[n-2, k-1]]; Table[T[n, k, 3], {n, 0, 10}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Nov 29 2019 *)
PROG
(PARI) T(n, k, m) = (m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1); \\ G. C. Greubel, Nov 29 2019
(Magma) m:=3; [(m*(n-k)+1)*Binomial(n-1, k-1) + (m*k+1)* Binomial(n-1, k) - m*k*(n-k)*Binomial(n-2, k-1): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 29 2019
(Sage) m=3; [[(m*(n-k)+1)*binomial(n-1, k-1) + (m*k+1)* binomial(n-1, k) - m*k*(n-k)*binomial(n-2, k-1) for k in (0..n)] for n in [0..10]] # G. C. Greubel, Nov 29 2019
(GAP) m:=3;; Flat(List([0..10], n-> List([0..n], k-> (m*(n-k)+1)*Binomial(n-1, k-1) + (m*k+1)* Binomial(n-1, k) - m*k*(n-k)*Binomial(n-2, k-1) ))); # G. C. Greubel, Nov 29 2019
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula and Gary W. Adamson, Feb 24 2009
EXTENSIONS
Edited by G. C. Greubel, Nov 29 2019
STATUS
approved