login
Triangle T(n,k) read by rows. If n=k then T(n,k)=1, elseif n=2*k then T(n,k)=-(k+1), else T(n,k)=0.
2

%I #16 Jun 04 2022 21:31:49

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

%T 0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,-6,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,

%U 0,0,0,0,0,-7,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,-8,0,0,0,0

%N Triangle T(n,k) read by rows. If n=k then T(n,k)=1, elseif n=2*k then T(n,k)=-(k+1), else T(n,k)=0.

%C Matrix inverse of this triangle is A155103.

%e Table begins:

%e 1,

%e -2,1,

%e 0,0,1,

%e 0,-3,0,1,

%e 0,0,0,0,1,

%e 0,0,-4,0,0,1,

%e 0,0,0,0,0,0,1,

%e 0,0,0,-5,0,0,0,1,

%t t[n_, k_] := Which[n == k, 1, n == 2k, -k - 1, True, 0]; Flatten[ Table[t[n, k], {n, 1, 14}, {k, 1, n}]] (* _Jean-François Alcover_, Jul 19 2012 *)

%o (PARI) T(n,k)=if(n==k,1,if(n==2*k,-(k+1))); for(n=1,20,for(k=1,n,print1(T(n,k),", "));print())

%o (Excel) =if(row()=column();1;if(and(row()>=column()*2;row()<=column()*2);-1;0))*(row()-column()+1)

%Y Cf. A155103.

%K sign,tabl

%O 1,2

%A _Mats Granvik_, Jan 20 2009

%E Definition clarified by _Mats Granvik_, Dec 05 2010