OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 6, 16, 36, 72, 128, 192, 192, -128, -1536, ...}.
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 = 2.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 7, 7, 1;
1, 10, 14, 10, 1;
1, 13, 22, 22, 13, 1;
1, 16, 31, 32, 31, 16, 1;
1, 19, 41, 35, 35, 41, 19, 1;
1, 22, 52, 26, -10, 26, 52, 22, 1;
1, 25, 64, 0, -154, -154, 0, 64, 25, 1;
1, 28, 77, -48, -462, -728, -462, -48, 77, 28, 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, 2), 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, 2], {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:=2; [(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=2; [[(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:=2;; 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
tabl,sign
AUTHOR
Roger L. Bagula and Gary W. Adamson, Feb 24 2009
EXTENSIONS
Edited by G. C. Greubel, Nov 29 2019
STATUS
approved