OFFSET
0,2
EXAMPLE
Triangle begins:
1
3, 3
7, 6, 7
13, 13, 13, 13
21, 26, 26, 26, 21
31, 47, 52, 52, 47, 31
43, 78, 99, 104, 99, 78, 43
57, 121, 177, 203, 203, 177, 121, 57
73, 178, 298, 380, 406, 380, 298, 178, 73
...
MAPLE
d:=[seq(n*(n+1)+1, n=0..14)];
f:=proc(d) local T, M, n, i;
M:=nops(d);
T:=Array(0..M-1, 0..M-1);
for n from 0 to M-1 do T[n, 0]:=d[n+1]; T[n, n]:=d[n+1]; od:
for n from 2 to M-1 do
for i from 1 to n-1 do T[n, i]:=T[n-1, i-1]+T[n-1, i]; od: od:
lprint("triangle:");
for n from 0 to M-1 do lprint(seq(T[n, i], i=0..n)); od:
lprint("row sums:");
lprint([seq( add(T[i, j], j=0..i), i=0..M-1)]);
end;
f(d);
MATHEMATICA
t[n_, n_] := n^2+n+1; t[n_, 0] := n^2+n+1; t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Feb 18 2013
STATUS
approved