OFFSET
1,5
COMMENTS
Row sums = A116725: (1, 2, 5, 12, 26, 52, ...).
LINKS
G. C. Greubel, Rows n = 1..100 of triangle, flattened
FORMULA
Let p(x, n) = (1+x)^n + (1/2) * Sum_{j=1..n-1} (n-j)*j*x^j*(1 + x^(n - 2*j)) with p(x, 0) = 1, then T(n, k) = Coefficients(p(x,n)). - Roger L. Bagula, Nov 02 2008
T(n, k) = (k-1)*(n-k) + binomial(n-1,k-1). - G. C. Greubel, Nov 29 2019
EXAMPLE
First few rows of the triangle are:
1;
1, 1;
1, 3, 1;
1, 5, 5, 1;
1, 7, 10, 7, 1;
1, 9, 16, 16, 9, 1;
1, 11, 23, 29, 23, 11, 1;
1, 13, 31, 47, 47, 31, 13, 1;
1, 15, 40, 71, 86, 71, 40, 15, 1;
...
MAPLE
seq(seq( (k-1)*(n-k) + binomial(n-1, k-1), k=1..n), n=1..10); # G. C. Greubel, Nov 29 2019
MATHEMATICA
p[x_, n_]:= p[x, n]= If[n==0, 1, (x+1)^n +Sum[(n-m)*m*x^m*(1 +x^(n-2*m)), {m, 1, n- 1}]/2]; Table[CoefficientList[FullSimplify[ExpandAll[p[x, n]]], x], {n, 0, 10}]//Flatten (* Roger L. Bagula, Nov 02 2008 *)
Table[(k-1)*(n-k) + Binomial[n-1, k-1], {n, 10}, {k, n}]//Flatten (* G. C. Greubel, Nov 29 2019 *)
PROG
(PARI) T(n, k) = (k-1)*(n-k) + binomial(n-1, k-1); \\ G. C. Greubel, Nov 29 2019
(Magma) [(k-1)*(n-k) + Binomial(n-1, k-1): k in [1..n], n in [1..10]]; // G. C. Greubel, Nov 29 2019
(Sage) [[(k-1)*(n-k) + binomial(n-1, k-1) for k in (1..n)] for n in (1..10)] # G. C. Greubel, Nov 29 2019
(GAP) Flat(List([1..10], n-> List([1..n], k-> (k-1)*(n-k) + Binomial(n-1, k-1) ))); # G. C. Greubel, Nov 29 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Oct 23 2007
EXTENSIONS
Extended by Roger L. Bagula, Nov 02 2008
Edited by G. C. Greubel, Nov 29 2019
STATUS
approved