OFFSET
0,4
FORMULA
T(n, k) = Pochhammer(2*k - 1 - n, 2) / 2!.
Row n is generated by the quadratic polynomial 2*x^2 - (2*n+5)*x + t(n+2), where t(n) are the triangular numbers, evaluated at x = k + 1.
T(n, k) = (2*k-1-n)*(2*k-n)/2. - Michel Marcus, May 29 2020
EXAMPLE
Triangle starts:
0;
1, 0;
3, 0, 1;
6, 1, 0, 3;
10, 3, 0, 1, 6;
15, 6, 1, 0, 3, 10;
21, 10, 3, 0, 1, 6, 15;
28, 15, 6, 1, 0, 3, 10, 21;
36, 21, 10, 3, 0, 1, 6, 15, 28;
45, 28, 15, 6, 1, 0, 3, 10, 21, 36;
55, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45;
66, 45, 28, 15, 6, 1, 0, 3, 10, 21, 36, 55;
78, 55, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45, 66;
MAPLE
T := (n, k) -> pochhammer(2*k - 1 - n, 2)/2:
seq(seq(T(n, k), k=0..n), n=0..11);
PROG
(Python)
def T(num_rows):
t, s = 1, 1
L, R = [0], [0]
for n in range(1, num_rows):
R.reverse()
R.insert(0, t)
L.extend(R)
t, s = t+s+1, s+1
return L
print(T(12))
(PARI) T(n, k) = (2*k-1-n)*(2*k-n)/2;
tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 29 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, May 29 2020
STATUS
approved