OFFSET
0,8
LINKS
FORMULA
T(n, 0) = Fibonacci(n - 1).
EXAMPLE
[0] 1;
[1] 0, 1;
[2] 1, 1, 1;
[3] 1, 2, 2, 1;
[4] 2, 3, 4, 3, 1;
[5] 3, 5, 7, 7, 4, 1;
[6] 5, 8, 12, 14, 11, 5, 1;
[7] 8, 13, 20, 26, 25, 16, 6, 1;
[8] 13, 21, 33, 46, 51, 41, 22, 7, 1;
[9] 21, 34, 54, 79, 97, 92, 63, 29, 8, 1;
MAPLE
T := proc(n, k) option remember;
if n = k then 1 elif k = n-1 then n-1 elif k = 0 then T(n-1, 1) else
T(n-1, k) + T(n-1, k-1) fi end: seq(seq(T(n, k), k = 0..n), n = 0..11);
MATHEMATICA
T[n_, k_] := Which[n == k, 1, k == n-1, n-1, k == 0, T[n-1, 1], True, T[n-1, k] + T[n-1, k-1]];
Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 29 2023 *)
PROG
(Python) from functools import cache
@cache
def A354267row(n):
if n == 0: return [1]
if n == 1: return [0, 1]
row = A354267row(n - 1) + [1]
s = row[1]
for k in range(n-1, 0, -1):
row[k] += row[k - 1]
row[0] = s
return row
for n in range(10): print(A354267row(n))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, May 31 2022
STATUS
approved