login
A347110
Primes p such that 2*p+1 and (2*p)^2+(2*p+1)^2 are also prime.
2
2, 11, 41, 281, 641, 761, 1451, 1481, 1811, 2741, 3821, 4211, 4481, 5441, 5501, 7121, 7691, 7901, 8111, 9791, 10061, 10331, 11171, 12011, 13451, 15401, 16001, 16421, 17351, 17981, 18041, 27281, 28961, 30851, 31151, 32561, 33941, 35111, 36191, 43391, 43691, 43721, 45131, 45641, 49331, 49811, 50411, 50591
OFFSET
1,1
COMMENTS
All terms except 2 end in 1.
LINKS
EXAMPLE
a(3) = 41 is a term because 41, 2*41+1 = 83 and (2*41)^2+(2*41+1)^2 = 13613 are prime.
MAPLE
filter:= proc(p) isprime(p) and isprime(2*p+1) and isprime(8*p^2+4*p+1) end proc:
select(filter, [2, seq(i, i=3..100000, 2)]);
MATHEMATICA
Select[Prime@ Range[5190], AllTrue[{# + 1, #^2 + (# + 1)^2}, PrimeQ] &[2 #] &] (* Michael De Vlieger, Aug 18 2021 *)
PROG
(Python)
from sympy import isprime, primerange
def ok(p): return isprime(2*p+1) and isprime((2*p)**2 + (2*p+1)**2)
print(list(filter(ok, primerange(1, 50592)))) # Michael S. Branicky, Aug 18 2021
(PARI) isok(p) = isprime(p) && isprime(2*p+1) && isprime(8*p^2+4*p+1); \\ Michel Marcus, Aug 18 2021
CROSSREFS
Intersection of A005384 and A103776.
Sequence in context: A260267 A128241 A258937 * A225907 A107020 A160945
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 18 2021
STATUS
approved