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

A076441
Let u(1) = u(2) = u(3) = 1; u(n) = sign(u(n-1)-u(n-2))*u(n-3), then a(n) = 1+u(n).
1
2, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 0
OFFSET
1,1
FORMULA
a(n) is a 9-periodic sequence with period (1, 0, 0, 1, 0, 2, 1, 2, 2)
MATHEMATICA
PadRight[{2}, 120, {1, 2, 2, 1, 0, 0, 1, 0, 2}] (* Harvey P. Dale, Nov 30 2018 *)
CROSSREFS
Sequence in context: A131079 A334889 A078336 * A319289 A124747 A334888
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 24 2002
STATUS
approved