This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A089594 Alternating sum of squares to n. 11
 -1, 3, -6, 10, -15, 21, -28, 36, -45, 55, -66, 78, -91, 105, -120, 136, -153, 171, -190, 210, -231, 253, -276, 300, -325, 351, -378, 406, -435, 465, -496, 528, -561, 595, -630, 666, -703, 741, -780, 820, -861, 903, -946, 990, -1035, 1081, -1128, 1176, -1225, 1275 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS 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 Also triangular numbers with alternating signs. - Stanislav Sykora, Nov 26 2013 LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..10000 Index entries for linear recurrences with constant coefficients, signature (-3,-3,-1). FORMULA From R. J. Mathar, Nov 05 2011: (Start) a(n) = Sum_{i=1..n} (-1)^i*i^2 = (-1)^n*n*(n+1)/2. G.f.: -x / (1+x)^3. (End) a(n) = (-1)^n*det(binomial(i+2,j+1), 1 <= i,j <= n-1). - Mircea Merca, Apr 06 2013 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 EXAMPLE a(6) = 1 + 4 - 9 + 16 - 25 + 36 = 3 + 7 + 11 = 21. MAPLE seq(sum(binomial(n, m), m=1..2)-n^2, n=2..51); # Zerinvary Lajos, Jun 19 2008 A089594 := n -> (-1)^n*n*(n+1)/2; # Peter Luschny, Jul 08 2011 MATHEMATICA nn = Range[50]; Accumulate[(-1)^nn*nn^2] (* Jayanta Basu, Jun 06 2013 *) PROG (PARI) for(i=1, 50, print1(", "sum(j=1, i, (-1)^j*j^2))) (PARI) a(n)=(-1)^n*n*(n+1)/2 \\ Charles R Greathouse IV, Jul 08 2011 (MAGMA) [(-1)^n*n*(n+1)/2: n in [1..50]]; // Vincenzo Librandi, Nov 16 2011 CROSSREFS Cf. A000217. Cf. A225144. [Bruno Berselli, Jun 06 2013] Sequence in context: A179865 A105339 * A253145 A161680 A000217 A105340 Adjacent sequences:  A089591 A089592 A089593 * A089595 A089596 A089597 KEYWORD sign,easy AUTHOR Jon Perry, Dec 30 2003 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 23 03:21 EDT 2018. Contains 316519 sequences. (Running on oeis4.)