A238242 Primes p such that p^2+p+41 is also prime.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 113, 131, 137, 139, 149, 151, 157, 167, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 241, 257, 263, 269, 277, 281, 293, 307, 311, 313, 317, 337, 353
Offset: 1
Keywords
Examples
13 is in the sequence because 13 is prime and 13^2+13+41 = 223 is also prime. 113 is in the sequence because 113 is prime and 113^2+113+41 = 12923 is also prime.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..3372
Programs
-
Magma
[p: p in PrimesUpTo(400)| IsPrime(p^2+p+41)]; // Vincenzo Librandi, Feb 22 2014
-
Maple
with(numtheory):KD := proc() local a,b; a:=ithprime(n); b:=a^2+a+41; if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..500);
-
Mathematica
Select[Prime[Range[200]],PrimeQ[#^2+#+41]&]
-
PARI
s=[]; forprime(p=2, 1000, if(isprime(p^2+p+41), s=concat(s, p))); s \\ Colin Barker, Feb 20 2014
Comments