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

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

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

Cf. A005408, A046901, A265327.

Sequence in context: A196505 A203816 A070437 * A128204 A079049 A114578

Adjacent sequences:  A238321 A238322 A238323 * A238325 A238326 A238327

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 13 13:15 EST 2018. Contains 317149 sequences. (Running on oeis4.)