OFFSET
0,5
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=1.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 5, 1;
1, 9, 9, 1;
1, 13, 26, 13, 1;
1, 17, 52, 52, 17, 1;
1, 21, 87, 134, 87, 21, 1;
1, 25, 131, 275, 275, 131, 25, 1;
1, 29, 184, 491, 670, 491, 184, 29, 1;
1, 33, 246, 798, 1386, 1386, 798, 246, 33, 1;
1, 37, 317, 1212, 2562, 3262, 2562, 1212, 317, 37, 1;
MAPLE
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); seq(seq( T(n, k, 1), k=0..n), n=0..10); # G. C. Greubel, Nov 29 2019
MATHEMATICA
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]; Table[T[n, k, 1], {n, 0, 10}, {k, 0, n}]//Flatten
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:=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): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 29 2019
(Sage) m=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) for k in (0..n)] for n in [0..10]] # G. C. Greubel, Nov 29 2019
(GAP) m:=1;; 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
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 24 2009
STATUS
approved