OFFSET
1,1
COMMENTS
Does this sequence contain every positive integer exactly once?
Inverse: 4, 1, 3, 14, 9, 2, 6, 13, 29, 8, 17, 37, 20, 41, 5, 12, 25, 53, ..., . - Robert G. Wilson v, Apr 09 2018
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
S:= {0, 2, 6}: A[1]:= 2: A[2]:= 6:
for n from 3 to 100 do
t:= floor(A[n-1]/2);
if member(t, S) then t:= 3*n fi;
A[n]:= t;
S:= S union {t};
od:
seq(A[n], n=1..100); # Robert Israel, Apr 09 2018
MATHEMATICA
f[s_] := Block[{b = Floor[s[[-1]]/2], l = Length@ s}, Append[s, If[MemberQ[s, b], 3l, b]]]; s = {0, 2, 6}; Nest[f, s, 57] (* Robert G. Wilson v, Apr 09 2018 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
Name corrected by Robert Israel, Apr 09 2018
STATUS
approved