cp's OEIS Frontend

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.

A379775 a(1) = 2. 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.

This page as a plain text file.
%I A379775 #14 Jan 03 2025 23:29:10
%S A379775 2,3,5,17,11,7,13,97,193,769,29,19,37,73,577,1153,461,307,613,31,61,
%T A379775 241,113,449,23,89,59,233,929,619,1237,2473,43,337,673,269,179,211,
%U A379775 421,41,107,71,47,67,53,139,277,79,157,313,1249,227,151,601,1201,4801
%N A379775 a(1) = 2. 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 A379775 The following are some statistics about how many terms of the sequence are required, so that the first k primes are included:
%C A379775 - The first 10^2 terms include the first 28 primes.
%C A379775 - The first 10^3 terms include the first 92 primes.
%C A379775 - The first 10^4 terms include the first 710 primes.
%C A379775 - The first 10^5 terms include the first 4848 primes.
%C A379775 - The first 10^6 terms include the first 29442 primes.
%C A379775 - The first 10^7 terms include the first 260324 primes.
%C A379775 Conjecture: this sequence is a permutation of the primes.
%H A379775 Robert C. Lyons, <a href="/A379775/b379775.txt">Table of n, a(n) for n = 1..10000</a>
%e A379775 a(6) is 7 because the prime factors of c=2*a(5)-1 (i.e., 21) are 3 and 7, and 3 already appears in the sequence as a(2).
%e A379775 a(8) is 97 because the only prime factor of c=2*a(7)-1 (i.e., 25) is 5 which already appears in the sequence as a(3). The next value of c (i.e., 2*c-1) is 49; its only prime factor is 7 which already appears in the sequence as a(6). The next value of c (i.e., 2*c-1) is 97, which is prime and does not already appear in the sequence.
%o A379775 (Python)
%o A379775 from sympy import primefactors
%o A379775 seq = [2]
%o A379775 seq_set = set(seq)
%o A379775 max_seq_len=100
%o A379775 while len(seq) <= max_seq_len:
%o A379775     c = seq[-1]
%o A379775     done = False
%o A379775     while not done:
%o A379775         c = 2*c-1
%o A379775         factors = primefactors(c)
%o A379775         for factor in factors:
%o A379775             if factor not in seq_set:
%o A379775                 seq.append(factor)
%o A379775                 seq_set.add(factor)
%o A379775                 done = True
%o A379775                 break
%o A379775 print(seq)
%Y A379775 Cf. A031439, A072268, A131200, A174162, A379652, A379648, A379776.
%K A379775 nonn
%O A379775 1,1
%A A379775 _Robert C. Lyons_, Jan 02 2025