OFFSET
0,5
COMMENTS
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
T(n,k) = T(n,n-k).
T(n, k) = (4 + n^2*(n+1)^2 - k^2*(k+1)^2 - (n-k)^2*(n-k+1)^2)/4. - G. C. Greubel, Nov 25 2019
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 8, 1;
1, 27, 27, 1;
1, 64, 83, 64, 1;
1, 125, 181, 181, 125, 1;
1, 216, 333, 370, 333, 216, 1;
1, 343, 551, 649, 649, 551, 343, 1;
1, 512, 847, 1036, 1097, 1036, 847, 512, 1;
1, 729, 1233, 1549, 1701, 1701, 1549, 1233, 729, 1;
1, 1000, 1721, 2206, 2485, 2576, 2485, 2206, 1721, 1000, 1;
MAPLE
seq(seq(, k=0..n), n=0..12); # G. C. Greubel, Nov 25 2019
MATHEMATICA
(* sequences with q=1..10 *)
f[n_, k_, q_]:= f[n, k, q] = 1 + Sum[i^q, {i, 0, n}] - Sum[i^q, {i, 0, k}] + Sum[i^q, {i, 0, n-k}])); Table[Flatten[Table[f[n, k, q], {n, 0, 10}, {k, 0, n}]], {q, 1, 10}]
(* Second program *)
Table[(4 +n^2*(n+1)^2 -k^2*(k+1)^2 -(n-k)^2*(n-k+1)^2)/4, {n, 0, 12}, {k, 0, n} ]//Flatten (* G. C. Greubel, Nov 25 2019 *)
PROG
(PARI) T(n, k) = 1 + (n^2*(n+1)^2 - k^2*(k+1)^2 - (n-k)^2*(n-k+1)^2)/4; \\ G. C. Greubel, Nov 25 2019
(Magma) [(4 +n^2*(n+1)^2 -k^2*(k+1)^2 -(n-k)^2*(n-k+1)^2)/4: k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 25 2019
(Sage) [[(4 +n^2*(n+1)^2 -k^2*(k+1)^2 -(n-k)^2*(n-k+1)^2)/4 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 25 2019
(GAP) Flat(List([0..12], n-> List([0..n], k-> (4 +n^2*(n+1)^2 -k^2*(k+1)^2 - (n-k)^2*(n-k+1)^2)/4 ))); # G. C. Greubel, Nov 25 2019
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Apr 14 2010
EXTENSIONS
Edited by R. J. Mathar, May 03 2013
STATUS
approved