login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A174218
An absolute difference sequence based on A087655: a(n)=If[Mod[A087655(n), 3] == 1, a(n - 1) - (-1)^n*n, a(n - 1) + (-1)^n*n]
1
1, 0, -2, 1, 5, 10, 16, 9, 17, 26, 16, 5, -7, 6, -8, 7, 23, 6, -12, 7, -13, 8, 30, 7, 31, 6, 32, 5, 33, 4, 34, 3, 35, 2, -32, -67, -31, -68, -30, -69, -29, 12, 54, 11, 55, 100, 54, 101, 149, 100, 150, 99, 47, -6, 48, -7, -63, -120, -62, -121, -61, -122, -184, -247, -183
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
Sequence in context: A019098 A333829 A035309 * A226308 A226309 A226311
KEYWORD
sign,uned
AUTHOR
Roger L. Bagula, Mar 12 2010
STATUS
approved