OFFSET
1,2
COMMENTS
Enters a loop starting at n = 420: [211, 423, 283, 567, 43, 87, 175, 71, 143, 287, 575, 231, 463, 927, 619, 1239, 2479, 4959, 3307, 6615].
MATHEMATICA
m = d[1] = 1; {1}~Join~Reap[Do[Set[n, If[IntegerQ@ #1, #1, 1 + 2 SelectFirst[Reverse@ #2, SquareFreeQ]]] & @@ {SelectFirst[#, ! IntegerQ[d[#]] &], #} &@ Divisors[m]; Sow[n]; Set[d[n], i]; m = n, {i, 2, 61}]][[-1, -1]] (* Michael De Vlieger, Nov 09 2021 *)
PROG
(Python)
from sympy import primefactors, prod, divisors
terms = [1]
for i in range(100):
for j in divisors(terms[-1]):
if j not in terms:
terms.append(j)
break
else:
terms.append(prod(primefactors(terms[-1]))*2+1)
print(terms)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gleb Ivanov, Nov 09 2021
STATUS
approved