A108013 Primes p such that p + 2 and p*(p + 2) + 2 are primes.
3, 5, 149, 179, 239, 269, 419, 569, 1289, 1319, 2309, 2549, 2729, 3359, 3389, 4259, 4649, 5849, 5879, 6359, 6779, 8999, 9239, 9629, 10529, 10889, 11969, 13679, 13829, 14009, 14549, 16229, 16649, 18059, 18119, 18539, 19139, 19379, 21599, 21839
Offset: 1
Examples
149*151 + 2 = 22501. 149, 151, and 22501 are all prime so 149 is in the sequence.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..5000
Crossrefs
Cf. A051779.
Programs
-
Magma
[p: p in PrimesUpTo(25000)| IsPrime(p+2) and IsPrime(p^2+2*p+2)] // Vincenzo Librandi, Jan 29 2011
-
Mathematica
Select[Prime@ Range@ 3000, AllTrue[{#2, #1 #2 + 2}, PrimeQ] & @@ {#, # + 2} &] (* Michael De Vlieger, Jan 22 2018 *)
-
PARI
g(n,k) = forprime(x1=3,n, x2=x1+2; if(isprime(x2), p=x1*x2+k; if(isprime(p), print1(x1",") ) ) )
Comments