This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A379727 #20 Jan 02 2025 09:34:56 %S A379727 1,3,7,5,11,23,47,19,13,37,151,101,29,59,17,71,41,83,167,67,271,181, %T A379727 727,97,1567,6271,113,227,911,1823,521,149,599,109,73,197,79,53,107, %U A379727 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 %N 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. %C A379727 If we start with a(1) = 2, we get A379652. %H A379727 Robert C. Lyons, <a href="/A379727/b379727.txt">Table of n, a(n) for n = 1..10000</a> %t A379727 c[_] := True; j = 1; c[1] = False; %t A379727 {j}~Join~Reap[Do[ %t A379727 m = 2*j + 1; %t A379727 While[ %t A379727 Set[k, SelectFirst[FactorInteger[m][[All, 1]], c]]; ! %t A379727 IntegerQ[k], m = 2*m + 1]; c[k] = False; %t A379727 j = Sow[k], {120}] ][[-1, 1]] (* _Michael De Vlieger_, Dec 31 2024 *) %o A379727 (Python) %o A379727 from sympy import primefactors %o A379727 seq = [1] %o A379727 seq_set = set(seq) %o A379727 max_seq_len=100 %o A379727 while len(seq) <= max_seq_len: %o A379727 c = seq[-1] %o A379727 done = False %o A379727 while not done: %o A379727 c = 2*c+1 %o A379727 factors = primefactors(c) %o A379727 for factor in factors: %o A379727 if factor not in seq_set: %o A379727 seq.append(factor) %o A379727 seq_set.add(factor) %o A379727 done = True %o A379727 break %o A379727 print(seq) # _Robert C. Lyons_, Jan 01 2025 %Y A379727 Cf. A379652, A379649. %K A379727 nonn %O A379727 1,2 %A A379727 _N. J. A. Sloane_, Dec 31 2024