OFFSET
0,3
COMMENTS
The general formula for alternating sums of powers of even integers is in terms of the Swiss-Knife polynomials P(n,x) A153641 (P(n,1)-(-1)^k P(n,2k+1))/2. Here n=1 and k shifted one place, thus a(k) = (P(1,1)-(-1)^(k-1) P(1,2(k-1)+1))/2. - Peter Luschny, Jul 12 2009
With just one 0 at the beginning, this is a permutation of all the even integers. - Alonso del Arte, Jun 24 2012
LINKS
FORMULA
a(n) = ( n - (1/2) + (1/2)*(-1)^n )*(-1)^n.
From R. J. Mathar, Feb 14 2010: (Start)
a(n) = -a(n-1) + a(n-2) + a(n-3).
G.f.: 2*x^2/((1-x) * (1+x)^2). (End)
MAPLE
den:= n -> (n-1/2+1/2*(-1)^n)*(-1)^n: seq(den(n), n=-10..10);
a := n -> (1+(-1)^n*(2*n-1))/2; # Peter Luschny, Jul 12 2009
MATHEMATICA
Flatten[Table[{2n, -2n}, {n, 0, 39}]] (* Alonso del Arte, Jun 24 2012 *)
With[{enos=2*Range[0, 40]}, Riffle[enos, -enos]] (* Harvey P. Dale, Oct 12 2014 *)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Carlos Alberto da Costa Filho (cacau_dacosta(AT)hotmail.com), Apr 22 2008
STATUS
approved