OFFSET
1,2
COMMENTS
This sequence has similarities with A008336.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..1000
EXAMPLE
MATHEMATICA
Nest[Append[#1, Block[{k = 2, s}, While[Nand[FreeQ[#1[[All, 1]], k], MemberQ[{1, k}, Set[s, GCD[#3, k]]]], k++]; {k, If[s == 1, #3 k, #3/k], If[Mod[#3, k] == 0, #3/k, #3 k]}]] & @@ {#, #[[-1, 1]], #[[-1, 2]], #[[-1, -1]]} &, {{1, 1, 1}}, 34][[All, -1]] (* Michael De Vlieger, Dec 23 2019 *)
PROG
(PARI) x=1; s=0; for (n=1, 35, for (v=1, oo, if (!bittest(s, v), if (gcd(x, v)==1, s+=2^v; x*=v; break, x%v==0, s+=2^v; x/=v; break))); print1 (x", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 22 2019
STATUS
approved