%I #42 Mar 19 2022 13:45:38
%S 1,1,2,1,3,2,1,5,8,4,1,6,13,12,4,1,8,25,38,28,8,1,9,33,63,66,36,8,1,
%T 11,51,129,192,168,80,16,1,12,62,180,321,360,248,96,16,1,14,86,304,
%U 681,1002,968,592,208,32,1,15,100,390,985,1683,1970,1560,800,240,32,1,17
%N Triangle of Sulanke numbers: T(n,k) = T(n,k-1) + a(n-1,k) for n+k even and a(n,k) = a(n,k-1) + 2*a(n-1,k) for n+k odd.
%C When A064861 is regarded as a triangle read by rows, this is [1,0,-1,0,0,0,0,0,0,...] DELTA [2,-1,-1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - _Philippe Deléham_, Dec 14 2008
%H Reinhard Zumkeller, <a href="/A064861/b064861.txt">Rows n = 0..125 of table, flattened</a>
%H Milan Janjić, <a href="https://arxiv.org/abs/1905.04465">On Restricted Ternary Words and Insets</a>, arXiv:1905.04465 [math.CO], 2019.
%H Milan Janjic and B. Petkovic, <a href="http://arxiv.org/abs/1301.4550">A Counting Function</a>, arXiv preprint arXiv:1301.4550 [math.CO], 2013. - From _N. J. A. Sloane_, Feb 13 2013
%H Milan Janjic and B. Petkovic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Janjic/janjic45.html">A Counting Function Generalizing Binomial Coefficients and Some Other Classes of Integers</a>, J. Int. Seq. 17 (2014) # 14.3.5.
%H C. de Jesús Pita Ruiz Velasco, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Pita/pita5.html">Convolution and Sulanke Numbers</a>, JIS 13 (2010) 10.1.8.
%H R. A. Sulanke, <a href="https://www.jstor.org/stable/2695626">Problem 10894</a>, Amer. Math. Monthly 108, (2001), p. 770.
%F G.f.: Sum_{m>=0} Sum_{n>=0} a_{m, n}*t^m*s^n = A(t,s) = (1+2*t+s)/(1-2*t^2-s^2-3*s*t).
%e Table begins:
%e 1, 1, 1, 1, 1, 1, 1, 1, ...
%e 2, 3, 5, 6, 8, 9, 11, ...
%e 2, 8, 13, 25, 33, 51, ...
%e 4, 12, 38, 63, 129, ...
%e 4, 28, 66, 192, ...
%p A064861 := proc(n,k) option remember; if n = 1 then 1; elif k = 0 then 0; else procname(n,k-1)+(3/2-1/2*(-1)^(n+k))*procname(n-1,k); fi; end;
%p seq(seq(A064861(i,j-i),i=1..j-1),j=1..19);
%t max = 12; se = Series[(1 + 2*x + y*x)/(1 - 2*x^2 - y^2*x^2 - 3*y*x^2), {x, 0, max}, {y, 0, max}]; cc = CoefficientList[se, {x, y}]; Flatten[ Table[ cc[[n, k]], {n, 1, max}, {k, n, 1, -1}]] (* _Jean-François Alcover_, Oct 21 2011, after g.f. *)
%o (PARI) a(n,m)=if(n<0 || m<0,0,polcoeff(polcoeff((1+2*x+y*x)/(1-2*x^2-y^2*x^2-3*y*x^2)+O(x^(n+m+1)),n+m),m))
%o (Haskell)
%o a064861 n k = a064861_tabl !! n !! k
%o a064861_row n = a064861_tabl !! n
%o a064861_tabl = map fst $ iterate f ([1], 2) where
%o f (xs, z) = (zipWith (+) ([0] ++ map (* z) xs) (xs ++ [0]), 3 - z)
%o -- _Reinhard Zumkeller_, May 01 2014
%Y Cf. central Delannoy numbers a(n,n) = A001850(n), Delannoy numbers (same main diagonal): a(n,n) = A008288(n,n), a(n-1,n)=A002003(n), a(n,n+1)=A002002(n), a(n,1)=A058582(n), apparently a(n,n+2)=A050151(n).
%K nonn,tabl,nice
%O 0,3
%A Barbara Haas Margolius (b.margolius(AT)csuohio.edu), Oct 10 2001