OFFSET
1,2
COMMENTS
If we start with a(1) = 2, we get A379652.
LINKS
Robert C. Lyons, Table of n, a(n) for n = 1..10000
MATHEMATICA
c[_] := True; j = 1; c[1] = False;
{j}~Join~Reap[Do[
m = 2*j + 1;
While[
Set[k, SelectFirst[FactorInteger[m][[All, 1]], c]]; !
IntegerQ[k], m = 2*m + 1]; c[k] = False;
j = Sow[k], {120}] ][[-1, 1]] (* Michael De Vlieger, Dec 31 2024 *)
PROG
(Python)
from sympy import primefactors
seq = [1]
seq_set = set(seq)
max_seq_len=100
while len(seq) <= max_seq_len:
c = seq[-1]
done = False
while not done:
c = 2*c+1
factors = primefactors(c)
for factor in factors:
if factor not in seq_set:
seq.append(factor)
seq_set.add(factor)
done = True
break
print(seq) # Robert C. Lyons, Jan 01 2025
CROSSREFS
KEYWORD
nonn,new
AUTHOR
N. J. A. Sloane, Dec 31 2024
STATUS
approved