login
A157636
Triangle read by rows: T(n, k) = 1 if k=0 or k=n, otherwise = n*k*(n-k)/2.
2
1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 6, 8, 6, 1, 1, 10, 15, 15, 10, 1, 1, 15, 24, 27, 24, 15, 1, 1, 21, 35, 42, 42, 35, 21, 1, 1, 28, 48, 60, 64, 60, 48, 28, 1, 1, 36, 63, 81, 90, 90, 81, 63, 36, 1, 1, 45, 80, 105, 120, 125, 120, 105, 80, 45, 1
OFFSET
0,8
FORMULA
T(n, k) = 1 if k=0 or k=n, otherwise = n*k*(n-k)/2.
Sum_{k=0..n} T(n, k) = 2 + n^2*(n^2 - 1)/12 = 2 + A002415(n) if n>0.
From G. C. Greubel, Dec 13 2021: (Start)
T(n, k) = T(n, n-k).
T(n, 1) = [n<2] + binomial(n, 2).
T(n, 2) = A132411(n-1), for n >= 2.
T(2*n, n) = [n=0] + A000578(n). (End)
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 1, 1;
1, 3, 3, 1;
1, 6, 8, 6, 1;
1, 10, 15, 15, 10, 1;
1, 15, 24, 27, 24, 15, 1;
1, 21, 35, 42, 42, 35, 21, 1;
1, 28, 48, 60, 64, 60, 48, 28, 1;
1, 36, 63, 81, 90, 90, 81, 63, 36, 1;
1, 45, 80, 105, 120, 125, 120, 105, 80, 45, 1;
MATHEMATICA
T[n_, k_] = If[n*k*(n-k)==0, 1, n*k*(n-k)/2];
Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten
PROG
(Magma) A157636:= func< n, k | k eq 0 or k eq n select 1 else n*k*(n-k)/2 >;
[A157636(n, k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 13 2021
(Sage)
def A157636(n, k): return 1 if (k==0 or k==n) else n*k*(n-k)/2
flatten([[A157636(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Dec 13 2021
CROSSREFS
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Mar 03 2009
STATUS
approved