OFFSET
0,3
COMMENTS
Abs[a(n)-a(n-1)]=n
MATHEMATICA
(*A087655[n]*)
Rauzy[n_Integer?Positive] := Rauzy[n] = Rauzy[ Abs[n - Rauzy[n - 1]]] + Rauzy[Abs[n - Rauzy[n - 2]]] + Rauzy[Abs[n - Rauzy[n - 3]]];
Rauzy[0] = Rauzy[1] = Rauzy[2] = Rauzy[3] = 1;
a[0] := 1; a[1] := 0;
a[n_] := a[n] = If[ Mod[Rauzy[n], 3] == 1, a[n - 1] - (-1)^n*n, a[n - 1] + (-1)^n*n];
Table[a[n], {n, 0, 200}]
CROSSREFS
KEYWORD
sign,uned
AUTHOR
Roger L. Bagula, Mar 12 2010
STATUS
approved