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!)
A238324 a(1) = 1 and a(n+1) = if a(n) > 2*n+1 then a(n)-2*n-1 else a(n)+2*n+1. 3
1, 4, 9, 2, 11, 22, 9, 24, 7, 26, 5, 28, 3, 30, 1, 32, 65, 30, 67, 28, 69, 26, 71, 24, 73, 22, 75, 20, 77, 18, 79, 16, 81, 14, 83, 12, 85, 10, 87, 8, 89, 6, 91, 4, 93, 2, 95, 190, 93, 192, 91, 194, 89, 196, 87, 198, 85, 200, 83, 202, 81, 204, 79, 206, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Abs(a(n+1) - a(n)) = 2*n+1;
a(A265327(n)) = n and a(m) != n for m < A265327(n).
LINKS
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[a>2n+1, a-2n-1, a+2n+1]}; NestList[nxt, {1, 1}, 70][[All, 2]] (* Harvey P. Dale, Oct 07 2016 *)
PROG
(Haskell)
a238324 n = a238324_list !! (n-1)
a238324_list = scanl1 (\u v -> if u > v then u - v else u + v) [1, 3 ..]
CROSSREFS
Sequence in context: A196505 A203816 A070437 * A370952 A128204 A079049
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 07 2015
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 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)