login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A209387 a(n) = 2*A005132(n) + 1. 2
1, 3, 7, 13, 5, 15, 27, 41, 25, 43, 23, 45, 21, 47, 19, 49, 17, 51, 87, 125, 85, 127, 83, 37, 85, 35, 87, 33, 89, 31, 91, 29, 93, 159, 227, 157, 229, 155, 79, 157, 77, 159, 75, 161, 73, 163, 71, 165, 69, 167, 67, 169, 65, 171, 63, 173, 61, 175, 59, 177, 57, 179, 55, 181, 53, 183, 315, 449, 313, 451, 311 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

This is the odd-numbers version of Recamán's sequence A005132: a(0)=1; for n>0, a(n) = a(n-1)-(2n+1) if that number is >= 0 and not already in the sequence, otherwise a(n) = a(n-1)+(2n+1).

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000

MATHEMATICA

f[s_List]:= Block[{a = s[[-1]], len = Length@s}, Append[s, If[a > len && ! MemberQ[s, a - len], a - len, a + len]]]; A005132:= Nest[f, {0}, 130]; Table[2*A005132[[n]] + 1, {n, 1, 50}] (* G. C. Greubel, Jan 03 2018 *)

CROSSREFS

Cf. A005132, A209386.

Sequence in context: A108154 A010260 A258136 * A128156 A108768 A238476

Adjacent sequences:  A209384 A209385 A209386 * A209388 A209389 A209390

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Mar 07 2012

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 4 05:42 EST 2021. Contains 341779 sequences. (Running on oeis4.)