A347110 Primes p such that 2*p+1 and (2*p)^2+(2*p+1)^2 are also prime.
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
Keywords
Examples
a(3) = 41 is a term because 41, 2*41+1 = 83 and (2*41)^2+(2*41+1)^2 = 13613 are prime.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
PARI
isok(p) = isprime(p) && isprime(2*p+1) && isprime(8*p^2+4*p+1); \\ Michel Marcus, Aug 18 2021
-
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
Comments