%I #23 Oct 22 2023 19:46:01
%S 1,1,3,1,4,3,1,7,15,9,1,8,22,24,9,1,11,46,90,81,27,1,12,57,136,171,
%T 108,27,1,15,93,307,579,621,351,81,1,16,108,400,886,1200,972,432,81,1,
%U 19,156,724,2086,3858,4572,3348,1377,243,1,20,175,880,2810,5944,8430,7920
%N Triangle T(n,k), 0 <= k <= n, read by rows, given by [1,0,-1,0,0,0,0,0,0,...] DELTA [3,-2,-1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.
%H Reinhard Zumkeller, <a href="/A152842/b152842.txt">Rows n = 0..125 of table, flattened</a>
%F T(n,k) = T(n-1,k) + (2-(-1)^n)*T(n-1,k-1).
%F Sum_{k=0..n} T(n,k) = A094015(n).
%F T(n,n) = A108411(n+1).
%F T(2n,n) = A069835(n).
%F G.f.: (1+x+x*y)/(1-x^2-4*x^2*y-3*x^2*y^2). - _Philippe Deléham_ , Nov 09 2013
%F T(n,k) = T(n-2,k) + 4*T(n-2,k-1) + 3*T(n-2,k-2), T(0,0) = T(1,0) = 1, T(1,1) = 3, T(n,k) = 0 if k < 0 or if k > n. - _Philippe Deléham_, Nov 09 2013
%e The triangle T(n,k) begins:
%e n\k 0 1 2 3 4 5 6 7 8 9 10 11 12
%e 0: 1
%e 1: 1 3
%e 2: 1 4 3
%e 3: 1 7 15 9
%e 4: 1 8 22 24 9
%e 5: 1 11 46 90 81 27
%e 6: 1 12 57 136 171 108 27
%e 7: 1 15 93 307 579 621 351 81
%e 8: 1 16 108 400 886 1200 972 432 81
%e 9: 1 19 156 724 2086 3858 4572 3348 1377 243
%e 10: 1 20 175 880 2810 5944 8430 7920 4725 1620 243
%e 11: 1 23 235 1405 5450 14374 26262 33210 28485 15795 5103 729
%e 12: 1 24 258 1640 6855 19824 40636 59472 61695 44280 20898 5832 729
%e ... reformatted and extended. - _Franck Maminirina Ramaharo_, Feb 28 2018
%o (Haskell)
%o a152842 n k = a152842_tabl !! n !! k
%o a152842_row n = a152842_tabl !! n
%o a152842_tabl = map fst $ iterate f ([1], 3) where
%o f (xs, z) = (zipWith (+) ([0] ++ map (* z) xs) (xs ++ [0]), 4 - z)
%o -- _Reinhard Zumkeller_, May 01 2014
%Y Cf. A152815, A007318, A064861.
%K nonn,tabl
%O 0,3
%A _Philippe Deléham_, Dec 14 2008