login
This site is supported by donations 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; 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

FORMULA

a(n)=(1/28)*{5*(n mod 8)-2*[(n+1) mod 8]-9*[(n+2) mod 8]-2*[(n+3) mod 8]+5*[(n+4) mod 8]+5*[(n+5) mod 8]+5*[(n+6) mod 8]+5*[(n+7) mod 8]}-2*[C(2*n,n) mod 2], with n>=0 [From Paolo P. Lava (paoloplava(AT)gmail.com), Aug 06 2009]

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 * A092147 A175560 A143240

Adjacent sequences:  A072172 A072173 A072174 * A072176 A072177 A072178

KEYWORD

sign

AUTHOR

Roger L. Bagula (rlbagulatftn(AT)yahoo.com), Jun 29 2002

EXTENSIONS

Edited by Dean Hickerson (dean.hickerson(AT)yahoo.com), Jul 31 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 23:53 EST 2012. Contains 205689 sequences.