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!)
A097857 a(0) = 1, a(1) = 1, a(n) = floor((a(n-1)+a(n-2))/2) + 3 if a(n-2) is even, a(n) = floor((a(n-1)-a(n-2))/2) + 3 if a(n-2) is odd. 0
1, 1, 3, 4, 3, 6, 4, 8, 9, 11, 4, -1, 4, 5, 7, 4, 1, 5, 5, 3, 2, 2, 5, 6, 3, 7, 5, 2, 1, 4, 4, 7, 8, 3, 8, 5, 9, 5, 1, 1, 3, 4, 3, 6, 4, 8, 9, 11, 4, -1, 4, 5, 7, 4, 1, 5, 5, 3, 2, 2, 5, 6, 3, 7, 5, 2, 1, 4, 4, 7, 8, 3, 8, 5, 9, 5, 1, 1, 3, 4, 3, 6, 4, 8, 9, 11, 4, -1, 4, 5, 7, 4, 1, 5, 5, 3, 2, 2, 5, 6, 3, 7, 5, 2, 1, 4, 4, 7, 8, 3, 8, 5, 9, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The series is periodic with period 38.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
MATHEMATICA
nxt[{a_, b_}]:={b, If[EvenQ[a], Floor[(a+b)/2]+3, Floor[(b-a)/2]+3]}; NestList[nxt, {1, 1}, 120][[All, 1]] (* Harvey P. Dale, Mar 08 2022 *)
CROSSREFS
Sequence in context: A061112 A078809 A245218 * A176058 A110738 A175028
KEYWORD
sign,easy
AUTHOR
Gerald McGarvey, Aug 31 2004
EXTENSIONS
More terms from Emeric Deutsch, Nov 17 2004
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 April 20 11:10 EDT 2024. Contains 371838 sequences. (Running on oeis4.)