login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A050136
a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1), otherwise a(n)=5*n.
5
1, 10, 5, 2, 25, 12, 6, 3, 45, 22, 11, 60, 30, 15, 7, 80, 40, 20, 95, 47, 23, 110, 55, 27, 13, 130, 65, 32, 16, 8, 4, 160, 165, 82, 41, 180, 90, 190, 195, 97, 48, 24, 215, 107, 53, 26, 235, 117, 58, 29, 14, 260, 265, 132, 66, 33, 285, 142, 71, 35, 17, 310, 155, 77, 38, 19, 9, 340, 170, 85, 42, 21
OFFSET
1,2
COMMENTS
Does this sequence contain every positive integer exactly once?
LINKS
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
EXTENSIONS
Corrected by Robert Israel, Aug 07 2018
STATUS
approved