[go: up one dir, main page]

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”).

A076452
a(n+2) = abs(a(n+1)) - a(n), a(0)=0, a(1)=1.
0
0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0, 1, 1, 0, -1, 1, 2, 1, -1, 0
OFFSET
0,7
LINKS
M. Brown and J. F. Slifker, Solution to Problem 6439, Amer. Math. Monthly, 92 (1985), p. 218.
M. Crampin, Piecewise linear recurrence relations, Math. Gaz., November 1992, p. 355.
FORMULA
a(n) = a(n-9), with a(0)=0, a(1)=1, a(2)=1, a(3)=0, a(4)=-1, a(5)=1, a(6)=2, a(7)=1, a(8)=-1. - Harvey P. Dale, May 23 2014
MATHEMATICA
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==Abs[a[n-1]]-a[n-2]}, a, {n, 100}] (* or *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 1, 1, 0, -1, 1, 2, 1, -1}, 100] (* or *) PadRight[{}, 100, {0, 1, 1, 0, -1, 1, 2, 1, -1}] (* Harvey P. Dale, May 23 2014 *)
CROSSREFS
Sequence in context: A101808 A145865 A341281 * A076453 A263657 A261769
KEYWORD
sign,easy
AUTHOR
Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002
STATUS
approved