login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A134398
Triangle read by rows: T(n, k) = (k-1)*(n-k) + binomial(n-1,k-1).
2
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, 1, 17, 50, 102, 146, 146, 102, 50, 17, 1, 1, 19, 61, 141, 234, 277, 234, 141, 61, 19, 1
OFFSET
1,5
COMMENTS
Row sums = A116725: (1, 2, 5, 12, 26, 52, ...).
FORMULA
T(n, k) = A077028(n,k) + A007318(n,k) - 1.
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