%I #19 Mar 07 2021 03:05:44
%S 1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,
%T -1,-1,1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,
%U -1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,-1,-1
%N Triangle read by rows. Main diagonal is positive. The rest of the terms are negative.
%C Triangle can be used in matrix inverses. Signs in columns as in A153881.
%C Iff n is a triangular number, a(n)=1; otherwise, a(n)=-1. (This is explicitly implemented in the second Mathematica program below.) - _Harvey P. Dale_, Apr 27 2014
%H G. C. Greubel, <a href="/A154990/b154990.txt">Rows n = 1..30 of the triangle, flattened</a>
%F From _G. C. Greubel_, Mar 06 2021: (Start)
%F T(n, k) = -1 with T(n, n) = 1.
%F Sum_{k=1..n} T(n, k) = 2-n = -A023443(n-1) = -A023444(n). (End)
%e Table begins:
%e 1;
%e -1, 1;
%e -1, -1, 1;
%e -1, -1, -1, 1;
%e -1, -1, -1, -1, 1;
%e -1, -1, -1, -1, -1, 1;
%e -1, -1, -1, -1, -1, -1, 1;
%p A154990 := proc(n,k)
%p option remember;
%p if k = n then
%p 1;
%p elif k > n then
%p 0;
%p else
%p -1 ;
%p end if;
%p end proc:
%p seq(seq(A154990(n,k),k=1..n),n=1..12) ; # _R. J. Mathar_, Sep 16 2017
%t Flatten[Table[PadLeft[{1},n,-1],{n,15}]] (* or *) With[{tr=Accumulate[ Range[ 15]]}, Table[If[MemberQ[tr,n],1,-1],{n,Last[tr]}]] (* _Harvey P. Dale_, Apr 27 2014 *)
%o (Sage) flatten([[1 if k==n else -1 for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Mar 06 2021
%o (Magma) [k eq n select 1 else -1: k in [1..n], n in [1..12]]; // _G. C. Greubel_, Mar 06 2021
%Y Cf. A023443, A023444.
%K sign,easy,tabl
%O 1,1
%A _Mats Granvik_, Jan 18 2009