[go: up one dir, main page]

login
A208101
Triangle read by rows: T(n,0) = 1; for n > 0: T(n,1) = n, for n>1: T(n,n) = T(n-1,n-2); T(n,k) = T(n-2,k-1) + T(n-1,k) for k: 1 < k < n.
4
1, 1, 1, 1, 2, 1, 1, 3, 2, 2, 1, 4, 3, 5, 2, 1, 5, 4, 9, 5, 5, 1, 6, 5, 14, 9, 14, 5, 1, 7, 6, 20, 14, 28, 14, 14, 1, 8, 7, 27, 20, 48, 28, 42, 14, 1, 9, 8, 35, 27, 75, 48, 90, 42, 42, 1, 10, 9, 44, 35, 110, 75, 165, 90, 132, 42, 1, 11, 10, 54, 44, 154, 110
OFFSET
0,5
COMMENTS
Another variant of Pascal's triangle, cf. A007318.
EXAMPLE
The triangle begins:
0: 1
1: 1 1
2: 1 2 1
3: 1 3 2 2
4: 1 4 3 5 2
5: 1 5 4 9 5 5
6: 1 6 5 14 9 14 5
7: 1 7 6 20 14 28 14 14
8: 1 8 7 27 20 48 28 42 14
9: 1 9 8 35 27 75 48 90 42 42
MATHEMATICA
T[_, 0] = 1; T[n_, 1] := n; T[n_, n_] := T[n-1, n-2]; T[n_, k_] /; 1<k<n := T[n, k] = T[n-1, k] + T[n-1, k-2]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 03 2018 *)
PROG
(Haskell)
a208101 n k = a208101_tabl !! n !! k
a208101_row n = a208101_tabl !! n
a208101_tabl = iterate
(\row -> zipWith (+) ([0, 1] ++ init row) (row ++ [0])) [1]
CROSSREFS
Cf. A208976 (row sums), A101461 (row max), A208983 (central), A208355 (right edge), A074909.
Sequence in context: A338714 A211161 A348687 * A131333 A120643 A242628
KEYWORD
nonn,tabl
AUTHOR
Reinhard Zumkeller, Mar 04 2012
STATUS
approved