OFFSET
0,2
COMMENTS
The sequence has period 8 except for the first term.
REFERENCES
Marius-F. Danca, Contributions to the Theory of Discontinuous Dynamical System, Thesis 2002, University Babes-Bolyai, Cluj, Romania, page 5
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1).
FORMULA
a(n) = a(n-1)-a(n-2)+a(n-3)-a(n-4)+a(n-5)-a(n-6)+a(n-7). - Wesley Ivan Hurt, May 26 2024
EXAMPLE
a(3) = 2+1-2*sign(1) = 1.
a(4) = 1+1-2*sign(2) = 0.
MATHEMATICA
a[1]=1; a[2]=2; a[n_] := a[n]=a[n-1]+1-2Sign[a[n-2]]
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Roger L. Bagula, Jun 29 2002
EXTENSIONS
Edited by Dean Hickerson, Jul 31 2002
STATUS
approved