login
A076451
Let w(1)=w(2)=w(3)=1, w(n) = (-1)^floor(n/2)*sign(w(n-1)-w(n-2))*w(n-3), then a(n) = 1+w(n).
0
2, 2, 2, 1, 0, 2, 1, 2, 2, 1, 2, 2, 1, 2, 0, 1, 2, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 1, 2, 2, 1, 0, 2, 1, 2, 2, 1, 2, 2, 1, 2, 0, 1, 2, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 1, 2, 2, 1, 0, 2, 1, 2, 2, 1, 2, 2, 1, 2, 0, 1, 2, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2
OFFSET
1,1
FORMULA
A 36-periodic sequence with period (1, 0, 2, 1, 2, 2, 1, 2, 2, 1, 2, 0, 1, 2, 2, 1, 0, 0, 1, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 1, 2, )
From Chai Wah Wu, Jun 12 2020: (Start)
a(n) = a(n-1) - a(n-18) + a(n-19) for n > 20.
G.f.: x*(x^19 - x^18 - x^16 - x^15 + 2*x^14 - x^13 + x^12 - x^10 + x^9 - x^7 + x^6 - 2*x^5 + x^4 + x^3 - 2)/(x^19 - x^18 + x - 1). (End)
CROSSREFS
Sequence in context: A357563 A112215 A176389 * A230536 A306257 A357316
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 24 2002
STATUS
approved