OFFSET
1,1
COMMENTS
p+4 is not prime here except for p=3.
LINKS
Iain Fox, Table of n, a(n) for n = 1..10000 (first 1000 terms from R. J. Mathar)
EXAMPLE
p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.
MAPLE
select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i, i=5..10000, 6)]); # Robert Israel, Nov 20 2017
MATHEMATICA
{3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* Michael De Vlieger, Nov 20 2017 *)
PROG
(Magma) [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // Vincenzo Librandi, Jan 28 2011
(PARI) lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ Iain Fox, Nov 20 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved