OFFSET
1,2
COMMENTS
Does this sequence contain every positive integer exactly once?
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
S:= {0, 1}: A[1]:= 1:
for n from 2 to 100 do
v:= floor(A[n-1]/2);
if not member(v, S) then A[n]:= v
else A[n]:= 5*n
fi;
S:= S union {A[n]};
od:
seq(A[i], i=1..100); # Robert Israel, Aug 07 2018
MATHEMATICA
f[s_List] := Block[{len = Length@s, m = Floor[s[[-1]]/2]}, Append[s, If[MemberQ[s, m], 5 len, m]]]; Rest@ Nest[f, {0, 1}, 65] (* Robert G. Wilson v, Aug 07 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
Corrected by Robert Israel, Aug 07 2018
STATUS
approved