The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A050128 a(n) = floor(a(n-1)/2) if this is not among 0, a(1), ..., a(n-1); otherwise a(n) = 2*n. 9
1, 4, 2, 8, 10, 5, 14, 7, 3, 20, 22, 11, 26, 13, 6, 32, 16, 36, 18, 9, 42, 21, 46, 23, 50, 25, 12, 56, 28, 60, 30, 15, 66, 33, 70, 35, 17, 76, 38, 19, 82, 41, 86, 43, 90, 45, 94, 47, 98, 49, 24, 104, 52, 108, 54, 27, 114, 57, 118, 59, 29, 124 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Does this sequence contain every positive integer exactly once?
LINKS
MAPLE
N:= 100: # for a(1)..a(N)
V:= Vector(N): S:= {0, 1}:
V[1]:= 1:
for n from 2 to N do
v:= floor(V[n-1]/2);
if member(v, S) then V[n]:= 2*n
else V[n]:= v
fi;
S:= S union {V[n]}
od:
convert(V, list); # Robert Israel, Feb 09 2020
MATHEMATICA
f[s_List] := Block[{len = Length@s, m = Floor[s[[-1]]/2]}, Append[s, If[MemberQ[s, m], 2 len, m]]]; Rest@Nest[f, {0, 1}, 65] (* Robert G. Wilson v, Aug 09 2018 *)
CROSSREFS
Sequence in context: A109816 A296477 A292964 * A321119 A246202 A134042
KEYWORD
nonn,look
AUTHOR
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 June 8 21:00 EDT 2024. Contains 373227 sequences. (Running on oeis4.)