OFFSET
1,1
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 8 + A022008(n). - R. J. Mathar, Aug 31 2008
EXAMPLE
15 is in the sequence since 15-2=13, 15+2=17, 15-4=11, 15+4=19, 15-8=7, and 15+8=23 are all prime.
MATHEMATICA
lst={}; Do[If[PrimeQ[n-2]&&PrimeQ[n+2]&&PrimeQ[n-4]&&PrimeQ[n+4]&&PrimeQ[n-8]&&PrimeQ[n+8], AppendTo[lst, n]], {n, 5*10!}]; lst
Mean/@Select[Partition[Prime[Range[123*10^4]], 6, 1], Differences[#]=={4, 2, 4, 2, 4}&] (* Harvey P. Dale, Oct 09 2018 *)
PROG
(Magma) [n: n in [0..2*10^7] | IsPrime(n-2) and IsPrime(n+2) and IsPrime(n-4)and IsPrime(n+4) and IsPrime(n-8) and IsPrime(n+8)]; /* or */ [8+p: p in PrimesUpTo(2*10^7) | IsPrime(p+4) and IsPrime(p+6) and IsPrime(p+10)and IsPrime(p+12) and IsPrime(p+16)]; // Vincenzo Librandi, Dec 01 2015
(PARI) isok(n) = isprime(n-2) && isprime(n+2) && isprime(n-4) && isprime(n+4) && isprime(n-8) && isprime(n+8); \\ Michel Marcus, Dec 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Aug 30 2008
STATUS
approved