OFFSET
0,3
COMMENTS
LINKS
Reinhard Zumkeller, Rows n = 0..150 of triangle, flattened
Henry W. Gould, A Variant of Pascal's Triangle, The Fibonacci Quarterly, Vol. 3, Nr. 4, Dec. 1965, pp. 257-271, with corrections.
FORMULA
T(n+1,2*k+1) = T(n,2*k), T(n+1,2*k) = T(n,2*k-1) + T(n,2*k).
EXAMPLE
Starting with 2nd row = [1 2] the rows of the triangle are defined recursively without computing explicitely binomial coefficients; demonstrated for row 8, (see also Haskell program):
(0) 1 1 7 6 14 9 7 2 [A] row 7 prepended by 0
1 1 7 6 14 9 7 2 (0) [B] row 7, 0 appended
1 0 1 0 1 0 1 0 1 [C] 1 and 0 alternating
1 0 7 0 14 0 7 0 0 [D] = [B] multiplied by [C]
1 1 8 7 20 14 16 7 2 [E] = [D] added to [A] = row 8.
The triangle begins: | A000204
1 | 1
1 2 | 3
1 1 2 | 4
1 1 3 2 | 7
1 1 4 3 2 | 11
1 1 5 4 5 2 | 18
1 1 6 5 9 5 2 | 29
1 1 7 6 14 9 7 2 | 47
1 1 8 7 20 14 16 7 2 | 76
1 1 9 8 27 20 30 16 9 2 | 123
1 1 10 9 35 27 50 30 25 9 2 | 199 .
MATHEMATICA
T[_, 0] = 1;
T[n_, n_] /; n > 0 = 2;
T[_, 1] = 1;
T[n_, k_] := T[n, k] = Which[
OddQ[k], T[n - 1, k - 1],
EvenQ[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, Dec 01 2021 *)
PROG
(Haskell)
a182579 n k = a182579_tabl !! n !! k
a182579_row n = a182579_tabl !! n
a182579_tabl = [1] : iterate (\row ->
zipWith (+) ([0] ++ row) (zipWith (*) (row ++ [0]) a059841_list)) [1, 2]
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, May 06 2012
STATUS
approved