OFFSET
1,1
COMMENTS
5+7=12+-1=primes, 5*7+7=42+-1=primes; 13+17=30+-1=primes, 13*17+7=228+-1=primes;...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
lst={}; Do[p0=Prime[n]; p1=Prime[n+1]; a=p0+p1; b=p0*p1+7; If[PrimeQ[a-1]&&PrimeQ[a+1]&&PrimeQ[b-1]&&PrimeQ[b+1], AppendTo[lst, p1]], {n, 9!}]; lst
atpQ[{a_, b_}]:=Module[{t=a+b, p=a*b}, AllTrue[{t-1, t+1, p+6, p+8}, PrimeQ]]; Transpose[ Select[Partition[Prime[Range[100000]], 2, 1], atpQ]][[2]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 09 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 24 2008
STATUS
approved