login
A181971
Triangle read by rows: T(n,0) = 1, T(n,n) = floor((n+3)/2) and T(n,k) = T(n-1,k-1) + T(n-1,k), 0 < k < n.
10
1, 1, 2, 1, 3, 2, 1, 4, 5, 3, 1, 5, 9, 8, 3, 1, 6, 14, 17, 11, 4, 1, 7, 20, 31, 28, 15, 4, 1, 8, 27, 51, 59, 43, 19, 5, 1, 9, 35, 78, 110, 102, 62, 24, 5, 1, 10, 44, 113, 188, 212, 164, 86, 29, 6, 1, 11, 54, 157, 301, 400, 376, 250, 115, 35, 6, 1, 12, 65, 211, 458, 701, 776, 626, 365, 150, 41, 7
OFFSET
0,3
COMMENTS
Another variant of Pascal's triangle;
row sums: A081254; central terms: T(2*n,n) = A128082(n+1);
T(n,0) = 1;
T(n,1) = n + 1 for n > 0;
T(n,2) = A000096(n-1) for n > 1;
T(n,3) = A105163(n-2) for n > 2;
T(n,n-2) = A005744(n-1) for n > 1;
T(n,n-1) = A024206(n) for n > 0;
T(n,n) = A008619(n+1).
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