|
|
A072175
|
|
a(1)=1, a(2)=2, a(n) = a(n-1) + 1 - 2*sign(a(n-2)) for n>2.
|
|
0
|
|
|
1, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3, 2, 1, 0, -1, 0, 3, 4, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|