OFFSET
0,5
COMMENTS
Sum of n-th row is 2^(n+1) - F(n+1) - 1 = A228078(n+1). - Greg Dresden and Sadek Mohammed, Aug 30 2022
LINKS
EXAMPLE
. 0: 0
. 1: 1 1
. 2: 1 2 2
. 3: 2 3 4 3
. 4: 3 5 7 7 4
. 5: 5 8 12 14 11 5
. 6: 8 13 20 26 25 16 6
. 7: 13 21 33 46 51 41 22 7
. 8: 21 34 54 79 97 92 63 29 8
. 9: 34 55 88 133 176 189 155 92 37 9
. 10: 55 89 143 221 309 365 344 247 129 46 10
. 11: 89 144 232 364 530 674 709 591 376 175 56 11
. 12: 144 233 376 596 894 1204 1383 1300 967 551 231 67 12 .
MAPLE
with(combinat);
T:= proc (n, k) option remember;
if k = 0 then fibonacci(n)
elif k = n then n
else T(n-1, k-1) + T(n-1, k)
end if
end proc;
seq(seq(T(n, k), k = 0..n), n = 0..12); # G. C. Greubel, Sep 05 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0, Fibonacci[n], If[k==n, n, T[n-1, k-1] + T[n -1, k]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] (* G. C. Greubel, Sep 05 2019 *)
PROG
(Haskell)
a228074 n k = a228074_tabl !! n !! k
a228074_row n = a228074_tabl !! n
a228074_tabl = map fst $ iterate
(\(u:_, vs) -> (vs, zipWith (+) ([u] ++ vs) (vs ++ [1]))) ([0], [1, 1])
(PARI) T(n, k) = if(k==0, fibonacci(n), if(k==n, n, T(n-1, k-1) + T(n-1, k)));
for(n=0, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, Sep 05 2019
(Sage)
def T(n, k):
if (k==0): return fibonacci(n)
elif (k==n): return n
else: return T(n-1, k) + T(n-1, k-1)
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Sep 05 2019
(GAP)
T:= function(n, k)
if k=0 then return Fibonacci(n);
elif k=n then return n;
else return T(n-1, k-1) + T(n-1, k);
fi;
end;
Flat(List([0..12], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Sep 05 2019
CROSSREFS
diagonals T(*,k): A000045, A000071, A001924, A014162, A014166, A053739, A053295, A053296, A053308, A053309;
diagonals T(k,*): A001477, A001245, A004006, A027927, A027928, A027929, A027930, A027931, A027932, A027933;
AUTHOR
Reinhard Zumkeller, Aug 15 2013
STATUS
approved