%I #22 Feb 17 2020 20:51:24
%S 1,0,1,0,1,1,0,0,3,1,0,1,0,6,1,0,0,5,0,10,1,0,1,0,15,0,15,1,0,0,7,0,
%T 35,0,21,1,0,1,0,28,0,70,0,28,1,0,0,9,0,84,0,126,0,36,1,0,1,0,45,0,
%U 210,0,210,0,45,1
%N Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, -1, -1, 1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.
%C T(n,k) = binomial (n,n-k+1) if (n-k) is an odd number (see A000217, A000332, A000579, A000581, ...). T(n,k)= 0 if (n-k)=2x with x > 0 (see A000004). T(n,n)=1 (see A000012).
%H G. C. Greubel, <a href="/A122960/b122960.txt">Rows n = 0..100 of triangle, flattened</a>
%F Sum_{k=0..n} T(n,k) = A011782(n).
%F Sum_{k=0..n} 2^k*T(n,k) = A083323(n).
%F Sum_{k=0..n} 2^(n-k)*T(n,k) = A122983(n).
%F G.f.: (1 - 2*x*y - x^2 + x^2*y^2 + x^2*y)/(1 - 3*x*y - x^2 + 3*x^2*y^2 + x^3*y - x^3*y^3). - _Philippe Deléham_, Nov 09 2013
%F T(n,k) = 3*T(n-1,k-1) + T(n-2,k) - 3*T(n-2,k-2) - T(n-3,k-1) + T(n-3,k-3), T(0,0) = T(1,1) = T(2,1) = T(2,2) = 1, T(1,0) = T(2,0) = 0, T(n,k) = 0 if k < 0 or if k > n. - _Philippe Deléham_, Nov 09 2013
%e Triangle begins:
%e 1;
%e 0, 1;
%e 0, 1, 1;
%e 0, 0, 3, 1;
%e 0, 1, 0, 6, 1;
%e 0, 0, 5, 0, 10, 1;
%e 0, 1, 0, 15, 0, 15, 1;
%e 0, 0, 7, 0, 35, 0, 21, 1;
%e 0, 1, 0, 28, 0, 70, 0, 28, 1;
%e 0, 0, 9, 0, 84, 0, 126, 0, 36, 1;
%e 0, 1, 0, 45, 0, 210, 0, 210, 0, 45, 1;
%p T:= proc(n, k) option remember;
%p if k<0 or k>n then 0
%p elif k=n then 1
%p elif n=2 and k=1 then 1
%p elif k=0 then 0
%p else 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3)
%p fi; end:
%p seq(seq(T(n, k), k=0..n), n=0..10); # _G. C. Greubel_, Feb 17 2020
%t With[{m = 10}, CoefficientList[CoefficientList[Series[(1-2*x*y-x^2+x^2*y^2+
%t x^2*y)/(1-3*x*y-x^2+3*x^2*y^2+x^3*y-x^3*y^3), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* _Georg Fischer_, Feb 17 2020 *)
%o (PARI) T(n, k) = if(k<0 || k>n, 0, if(k==n, 1, if(n==2 && k==1, 1, if(k==0, 0, 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3) )))); \\ _G. C. Greubel_, Feb 17 2020
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k<0 or k>n): return 0
%o elif (k==n): return 1
%o elif (n=2 and k=1): then 1
%o elif (k=0): then 0
%o else: return 3*T(n-1, k-1) + T(n-2, k) - 3*T(n-2, k-2) - T(n-3, k-1) + T(n-3, k-3)
%o [[T(n, k) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Feb 17 2020
%Y Cf. A000004, A000012, A000217, A000332, A000579, A000581, A007318.
%K nonn,tabl
%O 0,9
%A _Philippe Deléham_, Oct 26 2006
%E a(12) corrected by _Georg Fischer_, Feb 17 2020