(MAGMAMagma) 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
(MAGMAMagma) 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
proposed
approved
editing
proposed
proposed
approved
editing
proposed
A new general triangle sequence based on the binomial form in three parts:m=3; tTriangle, read by rows, T(n,k,m) = (m*(n - k) + 1)*Binomial[binomial(n - 1, k - 1] ) + (m*k + 1)*Binomial[ binomial(n - 1, k] ) - m*k*(n - k)*Binomial[binomial(n - 2, k - 1]), with m = 3.
Row sums are: {1, 2, 7, 20, 46, 92, 160, 224, 160, -448, -28166, ...}.
{1, 2, 7, 20, 46, 92, 160, 224, 160, -448, -28166,...}.
The m=1 of the general sequence is A134398 by Gary W. Adamson.
G. C. Greubel, <a href="/A157174/b157174.txt">Rows n = 0..100 of triangle, flattened</a>
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;.
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].
{1},
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};
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
ClearT[n_, k_, m_]:= If[n==0 && k==0, 1, (m*(n-k)+1)*Binomial[n-1, k-1] + (m*k+1)*Binomial[t, 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 *)
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, m], {m, 0, 10}, {n, 0, 10}, {k, 0, n}];
Table[Flatten[Table[Table[t[n, k, m], {k, 0, n}], {n, 0, 10}]], {m, 0, 10}]
Table[Table[Sum[t[n, k, m], {k, 0, n}], {n, 0, 10}], {m, 0, 10}];
(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
Edited by G. C. Greubel, Nov 29 2019
approved
editing
editing
approved
Cf. A134398.
The m=1 of the general sequence is A134398 by _Gary W. Adamson_.
approved
editing