OFFSET
0,3
COMMENTS
LINKS
EXAMPLE
The triangle begins:
. 0: 1
. 1: 1 2
. 2: 1 3 2
. 3: 1 4 5 3
. 4: 1 5 9 8 3
. 5: 1 6 14 17 11 4
. 6: 1 7 20 31 28 15 4
. 7: 1 8 27 51 59 43 19 5
. 8: 1 9 35 78 110 102 62 24 5
. 9: 1 10 44 113 188 212 164 86 29 6.
MATHEMATICA
T[n_ /; n >= 0, k_ /; k >= 0] := T[n, k] = If[n == k, Quotient[n + 3, 2], If[k == 0, 1, If[n > k, T[n - 1, k - 1] + T[n - 1, k]]]];
Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 12 2021 *)
PROG
(Haskell)
a181971 n k = a181971_tabl !! n !! k
a181971_row n = a181971_tabl !! n
a181971_tabl = map snd $ iterate f (1, [1]) where
f (i, row) = (1 - i, zipWith (+) ([0] ++ row) (row ++ [i]))
(PARI) {T(n, k)=if(n==k, (n+3)\2, if(k==0, 1, if(n>k, T(n-1, k-1)+T(n-1, k))))}
for(n=0, 12, for(k=0, n, print1(T(n, k), ", ")); print("")) \\ Paul D. Hanna, Jul 18 2012
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Jul 09 2012
STATUS
approved