The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Sequence in context: A116675 A123022 A072943 * A280712 A363926 A306607
KEYWORD
sign,easy,less
AUTHOR
Roger L. Bagula, Jun 29 2002
EXTENSIONS
Edited by Dean Hickerson, Jul 31 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 19:00 EDT 2024. Contains 372720 sequences. (Running on oeis4.)