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!)
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
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
Sequence in context: A010260 A366999 A258136 * A128156 A108768 A238476
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:19 EDT 2024. Contains 371905 sequences. (Running on oeis4.)