A248480 Consider two consecutive primes {p,q} such that P=2p+q and Q=2q+p are both prime. The sequence gives larger primes q.
5, 7, 17, 61, 107, 127, 227, 251, 271, 347, 499, 787, 797, 827, 919, 929, 1579, 1657, 1733, 1889, 1951, 2099, 2437, 2531, 2767, 2957, 2999, 3001, 3019, 3163, 3371, 3581, 3761, 4241, 4373, 4673, 4919, 5801, 5923, 6229, 6361, 6803, 7057, 7517, 7877, 9337, 9413, 10061, 10399, 11057, 11117, 11171
Offset: 1
Keywords
Examples
a(1)=5 because p=3, q=5 and P=11 and Q=13 are both prime. a(3)=17 because p=13, q=17 and P=43 and Q=47 are both prime.
Programs
-
Mathematica
Select[Table[If[PrimeQ[2*Prime[j-1] + Prime[j]] && PrimeQ[Prime[j-1] + 2*Prime[j]],Prime[j],0],{j,2,2000}],#!=0&] (* Vaclav Kotesovec, Oct 08 2014 *)
-
PARI
listq(nn) = {forprime(p=2, nn, q = nextprime(p+1); if (isprime(2*p+q) && isprime(2*q+p), print1(q, ", ")););} \\ Michel Marcus, Oct 07 2014