OFFSET
0,2
LINKS
G. C. Greubel, Rows n = 0..100 of triangle, flattened
FORMULA
T(n, k) = n*(n^2 + 3*n*(1+k) + 2 - 3*k^2)/6 for n >= 0, 0 <= k <= n.
EXAMPLE
Triangle begins as:
1;
4, 5;
10, 13, 13;
20, 26, 28, 26;
35, 45, 50, 50, 45;
56, 71, 80, 83, 80, 71;
MAPLE
seq(seq( (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 , k=0..n), n=0..12); # G. C. Greubel, Oct 30 2019
MATHEMATICA
Table[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6, {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
PROG
(PARI) T(n, k) = (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6;
for(n=0, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Oct 30 2019
(Magma) [(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6: k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2019
(Sage) [[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
(GAP) Flat(List([0..12], n-> List([0..n], k-> (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 ))); # G. C. Greubel, Oct 30 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Ralf Stephan, May 02 2004
STATUS
approved