OFFSET
1,2
COMMENTS
Sequence consists of 1 and numbers k such that A334943(k-1) | k.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
count:= 1: v:= 1: R:= 1:
for n from 2 while count < 100 do
g:= igcd(v, n);
if g > 1 then v:= v/g else v:= 3*v+n+1 fi;
if v = 1 then count:= count+1; R:= R, n; fi
od:
R;
MATHEMATICA
Position[Nest[Append[#1, If[#3 > 1, #1[[-1]]/#3, 3 #1[[-1]] + #2 + 1]] & @@ {#1, #2, GCD[#1[[-1]], #2]} & @@ {#, Length@ # + 1} &, {1}, 10^5], 1][[All, 1]] (* Michael De Vlieger, Jun 22 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Jun 22 2020
STATUS
approved