login
A379727
a(1) = 1. For n > 1, a(n) = smallest prime factor of c=2*a(n-1)+1 that is not in {a(1), ..., a(n-1)}; if all prime factors of c are in {a(1), ..., a(n-1)}, then we try the next value of c, which is 2*c+1; and so on.
3
1, 3, 7, 5, 11, 23, 47, 19, 13, 37, 151, 101, 29, 59, 17, 71, 41, 83, 167, 67, 271, 181, 727, 97, 1567, 6271, 113, 227, 911, 1823, 521, 149, 599, 109, 73, 197, 79, 53, 107, 43, 563, 347, 139, 31, 127, 89, 179, 359, 719, 1439, 2879, 443, 887, 7103, 14207, 5683, 421, 281, 1289, 2579, 607, 1621, 499, 1999, 5333, 10667, 251, 503, 733, 163, 131, 263, 211, 3391, 13567, 7753, 1723, 383, 307, 1231, 821, 173, 293
OFFSET
1,2
COMMENTS
If we start with a(1) = 2, we get A379652.
LINKS
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
Sequence in context: A074368 A074588 A287865 * A238086 A065175 A065283
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 31 2024
STATUS
approved