cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A154990 Triangle read by rows. Main diagonal is positive. The rest of the terms are negative.

This page as a plain text file.
%I A154990 #19 Mar 07 2021 03:05:44
%S A154990 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 A154990 -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 A154990 -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 A154990 Triangle read by rows. Main diagonal is positive. The rest of the terms are negative.
%C A154990 Triangle can be used in matrix inverses. Signs in columns as in A153881.
%C A154990 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 A154990 G. C. Greubel, <a href="/A154990/b154990.txt">Rows n = 1..30 of the triangle, flattened</a>
%F A154990 From _G. C. Greubel_, Mar 06 2021: (Start)
%F A154990 T(n, k) = -1 with T(n, n) = 1.
%F A154990 Sum_{k=1..n} T(n, k) = 2-n = -A023443(n-1) = -A023444(n). (End)
%e A154990 Table begins:
%e A154990    1;
%e A154990   -1,  1;
%e A154990   -1, -1,  1;
%e A154990   -1, -1, -1,  1;
%e A154990   -1, -1, -1, -1,  1;
%e A154990   -1, -1, -1, -1, -1,  1;
%e A154990   -1, -1, -1, -1, -1, -1, 1;
%p A154990 A154990 := proc(n,k)
%p A154990     option remember;
%p A154990     if k = n then
%p A154990         1;
%p A154990     elif k > n then
%p A154990         0;
%p A154990     else
%p A154990         -1 ;
%p A154990     end if;
%p A154990 end proc:
%p A154990 seq(seq(A154990(n,k),k=1..n),n=1..12) ; # _R. J. Mathar_, Sep 16 2017
%t A154990 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 A154990 (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 A154990 (Magma) [k eq n select 1 else -1: k in [1..n], n in [1..12]]; // _G. C. Greubel_, Mar 06 2021
%Y A154990 Cf. A023443, A023444.
%K A154990 sign,easy,tabl
%O A154990 1,1
%A A154990 _Mats Granvik_, Jan 18 2009