OFFSET
0,2
LINKS
N. J. A. Sloane and Alois P. Heinz, Table of n, a(n) for n = 0..20000 (first 1024 terms from N. J. A. Sloane)
EXAMPLE
9 appears in position 30 in A109732, so a(4) = 30.
MAPLE
with(LinearAlgebra);
hit:=Array(1..200000); a:=[1, 3, 7];
hit[1]:=1; hit[3]:=2; hit[7]:=3; S:={15}; L:=7;
for n from 4 to 20000 do
if (L mod 3 = 0) and hit[L/3]=0 then
L:=L/3; a:=[op(a), L]; hit[L]:=n; S:= S minus {L};
if hit[2*L+1]=0 then S:=S union {2*L+1}; fi;
else L:=min(S); a:=[op(a), L]; hit[L]:=n; S:=S minus {L};
if hit[2*L+1]=0 then S:=S union {2*L+1}; fi;
fi;
od:
#a;
w:=[];
for i from 0 to 50000 do
if hit[2*i+1]=0 then break; fi;
w:=[op(w), hit[2*i+1]]; od:
w; # N. J. A. Sloane, Aug 25 2015
MATHEMATICA
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 10 2005
EXTENSIONS
More terms from T. D. Noe and Ray Chandler, Aug 10 2005
STATUS
approved