OFFSET
1,1
COMMENTS
The definition ensures all terms are distinct. Like Euclid-Mullin sequence A000945, this definition is based on a straightforward way of demonstrating that a set of primes is infinite.
The general method here is to calculate the product Q of the preceding terms, determine the next larger number N = Q+j of the same form as that required for the sequence terms (with j coprime to all numbers of the required form), then determine N's least prime factor of that form.
This simple method works also for primes of the form 2k+1 (giving A125045), 3k+2 and 6k+5, but not for primes of the form m*k+1 for m > 2 (as some members of such residue classes do not have a prime factor with the same residue modulo m). But the method can be suitably adjusted with only a small loss of simplicity: see, for example, A057207, which generates primes of the form 4k+1.
As is the case for A000945, probabilistic analysis might be seen to support an expectation that all primes of the specified form appear in the sequence.
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..34
OEIS Wiki, Empty product.
OEIS Wiki, OEIS sequences needing factors.
Eric Weisstein's World of Mathematics, Residue Class.
FORMULA
a(n) = A125254((Q+1)/4) = min({p prime : p|Q and p has form 4k+3}), where Q = (Product_{k=1..(n-1)} a(k)) + 2*(2 - (n mod 2)).
EXAMPLE
For n=1: there are no preceding terms, so the product of these terms is Q = 1 (the empty product); Q + 2 = 3 has the form 4k+3 (k = 0); the least prime factor of 3 that has the form 4k+3 is obviously its only prime factor, 3; so a(1) = 3.
For n=6: the product of the preceding 5 terms is Q = 3 * 7 * 23 * 487 * 71 = 16700691; N = Q + 4 = 16700695 has the form 4k+3 and the prime factorization of N is 5 * 11 * 303649; 5 has the form 4k+1, so the least prime factor of N that has the form 4k+3 is 11 = 4*2+3; so a(6) = 11.
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Munn, Oct 20 2025
EXTENSIONS
More terms from Sean A. Irvine, Dec 07 2025
STATUS
approved
