OFFSET
1,1
COMMENTS
One of the prime factors must be 3.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
a(3) = 137 is a term because 137 and 139 are primes and 137*139+137-1 = 19179 = 3^2 * 2131, 137*139+137+1 = 19181 and 137*139+137+3 = 19183 have the four prime factors 3, 2131, 19181 and 19183.
MAPLE
R:= 3: count:= 1:
for p from 5 by 6 while count < 40 do
if isprime(p) and isprime(p+2) and nops(numtheory:-factorset(p^2+3*p-1) union numtheory:-factorset(p^2+3*p+1)
union numtheory:-factorset(p^2+3*p+3)) <= 4 then
count:= count+1; R:= R, p;
fi;
od:
R;
MATHEMATICA
Select[Prime[Range[250000]], PrimeQ[# + 2] && Length[Union[(Join @@ FactorInteger[#^2 + 3*# + {-1, 1, 3}])[[;; , 1]]]] <= 4 &] (* Amiram Eldar, Jul 20 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 17 2022
STATUS
approved