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”).

A157528
Triangle read by rows: T(n, k) = 2*k*(n - k) with T(n, 0) = T(n, n) = 1.
1
1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 6, 8, 6, 1, 1, 8, 12, 12, 8, 1, 1, 10, 16, 18, 16, 10, 1, 1, 12, 20, 24, 24, 20, 12, 1, 1, 14, 24, 30, 32, 30, 24, 14, 1, 1, 16, 28, 36, 40, 40, 36, 28, 16, 1, 1, 18, 32, 42, 48, 50, 48, 42, 32, 18, 1
OFFSET
0,5
FORMULA
T(n, k) = 2*k*(n - k) with T(n, 0) = T(n, n) = 1.
Sum_{k=0..n} T(n, k) = (n+2)*(n^2 - 2*n + 3)/3 - [n=0].
EXAMPLE
Triangle begins
1;
1, 1;
1, 2, 1;
1, 4, 4, 1;
1, 6, 8, 6, 1;
1, 8, 12, 12, 8, 1;
1, 10, 16, 18, 16, 10, 1;
1, 12, 20, 24, 24, 20, 12, 1;
1, 14, 24, 30, 32, 30, 24, 14, 1;
1, 16, 28, 36, 40, 40, 36, 28, 16, 1;
1, 18, 32, 42, 48, 50, 48, 42, 32, 18, 1;
MAPLE
A157528 := proc(n, k) if k=0 or k=n then 1; else 2*k*(n-k) ; end if; end proc: # R. J. Mathar, Sep 14 2011
MATHEMATICA
T[n_, k_] = With[{m=2}, If[k*(n-k)==0, 1, n^m - (k^m + (n-k)^m)]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(Magma) [k eq 0 or k eq n select 1 else 2*k*(n-k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 14 2022
(Sage) flatten([[1 if (k==0 or k==n) else 2*k*(n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jan 14 2022
CROSSREFS
Sequence in context: A147532 A283796 A156580 * A132731 A128966 A055907
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Mar 02 2009
STATUS
approved