OFFSET
0,5
LINKS
Reinhard Zumkeller, Rows n = 0..100 of triangle, flattened
A. L. Rosenberg, Profile numbers, Fibonacci Quart. 17 (1979), no. 3, 259-264.
FORMULA
a(n+1, k+1) = a(n, k)+2*a(n, k-1), k>0; a(n, 0)=1, a(1, 1)=1, a(n, 1)=2, a(n, n)=2^(n-1).
EXAMPLE
Triangle starts:
1;
1, 1;
1, 2, 3, 2;
1, 2, 4, 7, 8, 4;
1, 2, 4, 8, 15, 22, 20, 8; ...
MATHEMATICA
a[n_ /; n >= 1, 0] = 1; a[1, 1] = 1; a[n_ /; n > 1, 1] = 2; a[1, k_ /; k > 1] = 0; a[0, 0] = 1; a[n_, k_ /; k > 0] := a[n, k] = a[n-1, k-1] + 2 a[n-1, k-2]; a[_, _] = 0; Table[a[n, k], {n, 0, 8}, {k, 0, Max[0, 2n-1]}] // Flatten (* Jean-François Alcover, Oct 19 2016 *)
PROG
(Haskell)
a049063 n k = a049063_tabf !! n !! k
a133457_row n = a049063_tabf !! n
a049063_tabf = [1] : iterate f [1, 1] where
f row = 1 : 2 : zipWith (+) ( map (* 2) row) ((tail row) ++ [0])
-- Reinhard Zumkeller, Feb 12 2013
CROSSREFS
KEYWORD
nonn,easy,nice,tabf
AUTHOR
EXTENSIONS
More terms from James A. Sellers
STATUS
approved