login
A076447
Let v(1)=v(2)=v(3)=1, v(n)=(-1)^n*sign(v(n-1)-v(n-2))*v(n-3), then a(n) =1+v(n).
0
2, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0
OFFSET
1,1
FORMULA
a(n) is a period-8 sequence with period (1, 0, 2, 1, 0, 0, 1, 0, 0, 1, 2, 0, 1, 2, 2, 1, 2, 2)
CROSSREFS
Sequence in context: A374344 A238421 A105154 * A136690 A144703 A276825
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Nov 24 2002
STATUS
approved