login
A353045
Primes of the form p*q*(p+q)+1 where (p,q) is a twin prime pair.
1
421, 3433, 431881, 746353, 2122213, 84287689, 161242273, 574990681, 1372256173, 6589289569, 8315492209, 13246972549, 40692828541, 52396140061, 75866105281, 77916431221, 82987207333, 91919299573, 140685402049, 152665872493, 188144420089, 199536434869, 265301989801, 404110652329, 406594932241
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 431881 is a term because (59, 61) is a twin prime pair with 59*61*(59+61)+1 = 431881, and 431881 is prime.
MAPLE
P:= select(isprime, {seq(i, i=3..10^6, 2)}):
T:= P intersect map(`-`, P, 2):
R:= map(t -> t*(t+2)*(2*t+2)+1, T):
sort(convert(select(isprime, R), list));
MATHEMATICA
Select[#[[1]]#[[2]]Total[#]+1&/@Select[Partition[Prime[Range[1000]], 2, 1], #[[2]]-#[[1]] == 2&], PrimeQ] (* Harvey P. Dale, Aug 17 2024 *)
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
p, q = 3, 5
while True:
if q == p+2:
t = p*q*(p+q)+1
if isprime(t):
yield t
p, q = q, nextprime(q)
print(list(islice(agen(), 25))) # Michael S. Branicky, Apr 19 2022
CROSSREFS
Cf. A001359.
Sequence in context: A068701 A340157 A302284 * A302732 A251198 A302533
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 19 2022
STATUS
approved