A208245 Triangle read by rows: a(n,k) = a(n-2,k) + a(n-2,k-1).
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 6, 5, 3, 2, 1, 1, 1, 4, 7, 7, 5, 3, 2, 1, 1, 1, 5, 10, 11, 8, 5, 3, 2, 1, 1, 1, 5, 11, 14, 12, 8, 5, 3, 2, 1, 1, 1, 6, 15, 21, 19, 13, 8, 5, 3, 2, 1, 1, 1, 6, 16, 25, 26, 20, 13, 8, 5, 3, 2, 1, 1
Offset: 1
Examples
The first 13 rows are (as above) where n is the row index: 1 1, 1 1, 1, 1 1, 2, 1, 1 1, 2, 2, 1, 1 1, 3, 3, 2, 1, 1 1, 3, 4, 3, 2, 1, 1 1, 4, 6, 5, 3, 2, 1, 1 1, 4, 7, 7, 5, 3, 2, 1, 1 1, 5, 10, 11, 8, 5, 3, 2, 1, 1 1, 5, 11, 14, 12, 8, 5, 3, 2, 1, 1 1, 6, 15, 21, 19, 13, 8, 5, 3, 2, 1, 1 1, 6, 16, 25, 26, 20, 13, 8, 5, 3, 2, 1, 1,
Links
- Reinhard Zumkeller, Rows n = 1..100 of triangle, flattened
Crossrefs
Cf. A000045 (central terms).
Programs
-
Haskell
a208245 n k = a208245_tabl !! (n-1) !! (k-1) a208245_row n = a208245_tabl !! (n-1) a208245_tabl = map fst $ iterate f ([1], [1, 1]) where f (us, vs) = (vs, zipWith (+) ([0] ++ us ++ [0]) (us ++ [0, 1])) -- Reinhard Zumkeller, Jul 28 2013
Formula
a(n,k) = a(n-2,k) + a(n-2,k-1); if n=k or k=1 then a(n,k)=1; if n
Comments