login
Triangle with T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k) and T(0,0)=1 .
7

%I #25 Mar 15 2020 22:26:12

%S 1,1,1,0,1,1,-1,-1,1,1,-1,-3,-2,1,1,0,-2,-5,-3,1,1,1,2,-2,-7,-4,1,1,1,

%T 5,7,-1,-9,-5,1,1,0,3,12,15,1,-11,-6,1,1,-1,-3,3,21,26,4,-13,-7,1,1,

%U -1,-7,-15,-3,31,40,8,-15,-8,1,1

%N Triangle with T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k) and T(0,0)=1 .

%C Triangle T(n,k), 0<=k<=n, read by rows given by [1,-1,1,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] where DELTA is the operator defined in A084938 . Riordan array (1/(1-x+x^2),(x*(1-x))/(1-x+x^2)); inverse array is (1/(1+x),(x/(1+x))*c(x/(1+x))) where c(x)is g.f. of A000108 .

%C Row sums are ( with the addition of a first row {0}): 0, 1, 2, 2, 0, -4, -8, -8, 0, 16, 32,... (see A009545). - _Roger L. Bagula_, Nov 15 2009

%H G. C. Greubel, <a href="/A129267/b129267.txt">Rows n = 0..100 of the triangle, flattened</a>

%F Sum{k=0..n} T(n,k)*x^k = { (-1)^n*A057093(n), (-1)^n*A057092(n), (-1)^n*A057091(n), (-1)^n*A057090(n), (-1)^n*A057089(n), (-1)^n*A057088(n), (-1)^n*A057087(n), (-1)^n*A030195(n+1), (-1)^n*A002605(n), A039834(n+1), A000007(n), A010892(n), A099087(n), A057083(n), A001787(n+1), A030191(n), A030192(n), A030240(n), A057084(n), A057085(n), A057086(n) } for x=-11, -10, ..., 8, 9, respectively .

%F Sum{k=0..n} T(n,k)*A000045(k) = A100334(n).

%F Sum{k=0..floor(n/2)} T(n-k,k) = A050935(n+2).

%F T(n,k)= Sum{j>=0} A109466(n,j)*binomial(j,k).

%F T(n,k) = (-1)^(n-k)*A199324(n,k) = (-1)^k*A202551(n,k) = A202503(n,n-k). - _Philippe Deléham_, Mar 26 2013

%F G.f.: 1/(1-x*y+x^2*y-x+x^2). - _R. J. Mathar_, Aug 11 2015

%e Triangle begins:

%e 1;

%e 1, 1;

%e 0, 1, 1;

%e -1, -1, 1, 1;

%e -1, -3, -2, 1, 1;

%e 0, -2, -5, -3, 1, 1;

%e 1, 2, -2, -7, -4, 1, 1;

%e 1, 5, 7, -1, -9, -5, 1, 1;

%e 0, 3, 12, 15, 1, -11, -6, 1, 1;

%e -1, -3, 3, 21, 26, 4, -13, -7, 1, 1;

%e -1, -7, -15, -3, 31, 40, 8, -15, -8, 1, 1;

%p T:= proc(n, k) option remember;

%p if k<0 or k>n then 0

%p elif n=0 and k=0 then 1

%p else T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k)

%p fi; end:

%p seq(seq(T(n, k), k=0..n), n=0..12); # _G. C. Greubel_, Mar 14 2020

%t m = {{a, 1}, {-1, 1}}; v[0]:= {0, 1}; v[n_]:= v[n] = m.v[n-1]; Table[CoefficientList[v[n][[1]], a], {n, 0, 10}]//Flatten (* _Roger L. Bagula_, Nov 15 2009 *)

%t T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n==0 && k==0, 1, T[n-1, k-1] + T[n-1, k] - T[n-2, k-1] - T[n-2, k] ]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Mar 14 2020 *)

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o if (k<0 or k>n): return 0

%o elif (n==0 and k==0): return 1

%o else: return T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k)

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Mar 14 2020

%Y Cf. A063967, A167925, A199324, A202503, A202551.

%K sign,tabl

%O 0,12

%A _Philippe Deléham_, Jun 08 2007

%E Riordan array definition corrected by _Ralf Stephan_, Jan 02 2014