OFFSET
0,1
LINKS
FORMULA
From R. J. Mathar, Jan 03 2009, Aug 14 2009: (Start)
a(n) = (n+1)/2-(9*(-1)^n+1)/4.
G.f.: -(2*x-1)*(x-2)/((1+x)*(x-1)^2).
a(n) = a(n-1)+a(n-2)-a(n-3). (End)
MATHEMATICA
lst={}; a=2; Do[a=n-a; AppendTo[lst, a], {n, 0, 6!}]; lst
RecurrenceTable[{a[0]==-2, a[n]==n-a[n-1]}, a, {n, 80}] (* or *) With[ {nn=40}, Riffle[ Range[-2, nn-2], Range[3, nn+3]]] (* Harvey P. Dale, Jun 02 2019 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 14 2008
EXTENSIONS
Definition corrected by N. J. A. Sloane, Jan 11 2009
Formula adapted to offset by R. J. Mathar, Aug 14 2009
STATUS
approved