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.
%I A089594 #52 Jan 31 2023 08:30:29 %S A089594 -1,3,-6,10,-15,21,-28,36,-45,55,-66,78,-91,105,-120,136,-153,171, %T A089594 -190,210,-231,253,-276,300,-325,351,-378,406,-435,465,-496,528,-561, %U A089594 595,-630,666,-703,741,-780,820,-861,903,-946,990,-1035,1081,-1128,1176,-1225,1275 %N A089594 Alternating sum of squares to n. %C A089594 Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 2, A[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=3, a(n-1)=(-1)^(n-1)*coeff(charpoly(A,x),x^(n-2)). - _Milan Janjic_, Jan 24 2010 %C A089594 Also triangular numbers with alternating signs. - _Stanislav Sykora_, Nov 26 2013 %H A089594 Vincenzo Librandi, <a href="/A089594/b089594.txt">Table of n, a(n) for n = 1..10000</a> %H A089594 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-3,-3,-1). %F A089594 From _R. J. Mathar_, Nov 05 2011: (Start) %F A089594 a(n) = Sum_{i=1..n} (-1)^i*i^2 = (-1)^n*n*(n+1)/2. %F A089594 G.f.: -x / (1+x)^3. (End) %F A089594 a(n) = (-1)^n*det(binomial(i+2,j+1), 1 <= i,j <= n-1). - _Mircea Merca_, Apr 06 2013 %F A089594 G.f.: -W(0)/(2+2*x), where W(k) = 1 + 1/( 1 - x*(k+2)/( x*(k+2) - (k+1)/W(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Aug 19 2013 %F A089594 E.g.f.: (1/2)*x*(x-2)*exp(-x). - _G. C. Greubel_, Mar 31 2021 %F A089594 Sum_{n>=1} 1/a(n) = 2 - 4*log(2). - _Amiram Eldar_, Jan 31 2023 %e A089594 a(6) = 1 + 4 - 9 + 16 - 25 + 36 = 3 + 7 + 11 = 21. %p A089594 seq(sum(binomial(n,m), m=1..2)-n^2,n=2..51); # _Zerinvary Lajos_, Jun 19 2008 %p A089594 A089594 := n -> (-1)^n*n*(n+1)/2; # _Peter Luschny_, Jul 08 2011 %t A089594 nn = Range[50]; Accumulate[(-1)^nn*nn^2] (* _Jayanta Basu_, Jun 06 2013 *) %o A089594 (PARI) for(i=1,50, print1(","sum(j=1,i,(-1)^j*j^2))) %o A089594 (PARI) a(n)=(-1)^n*n*(n+1)/2 \\ _Charles R Greathouse IV_, Jul 08 2011 %o A089594 (Magma) [(-1)^n*n*(n+1)/2: n in [1..50]]; // _Vincenzo Librandi_, Nov 16 2011 %o A089594 (Sage) [(-1)^n*binomial(n+1,2) for n in (1..50)] # _G. C. Greubel_, Mar 31 2021 %Y A089594 Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), this sequence (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2). %Y A089594 Cf. A000217. %Y A089594 Cf. A225144. [_Bruno Berselli_, Jun 06 2013] %K A089594 sign,easy %O A089594 1,2 %A A089594 _Jon Perry_, Dec 30 2003