A174915 Numbers p such that p, q=p+2 and p+2*q are all primes.
3, 5, 11, 41, 59, 101, 179, 191, 269, 311, 431, 521, 599, 821, 881, 1019, 1061, 1151, 1229, 1301, 1451, 1481, 1619, 1721, 1949, 2081, 2111, 2141, 2729, 2999, 3299, 3821, 4001, 4091, 4259, 4421, 4799, 4931, 5009, 5519, 5639, 5849, 6131, 6359, 6689, 6701
Offset: 1
Keywords
Links
- Zak Seidov, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[p: p in PrimesUpTo(7000) | IsPrime(p+2) and IsPrime(3*p+4)]; // Vincenzo Librandi, Jan 29 2015
-
Mathematica
lst={};Do[p1=Prime[n];p2=p1+2;If[PrimeQ[p2]&&PrimeQ[p1+2*p2],AppendTo[lst,p1]],{n,7!}];lst Reap[Do[p = Prime[m]; If[PrimeQ[p + 2 ] && PrimeQ[3 p + 4], Sow[p]], {m, 10^3}]][[2, 1]](* Zak Seidov, Oct 14 2012 *) Transpose[Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==2 && PrimeQ[ #[[1]]+2#[[2]]]&]][[1]] (* Harvey P. Dale, Jan 28 2015 *)
-
PARI
forprime(p=2,7000,q=p+2;if(isprime(q)&& isprime(p+2*q),print1(p,", ")))
Extensions
Definition and comment corrected by Zak Seidov, Dec 06 2010
Comments