OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
7 = prime(4) and both 7 - 4 = 3 and 7 + 4 = 11 are prime;
13 = prime(6) and both 13 - 6 = 7 and 13 + 6 = 19 are prime;
61 = prime(18) and both 61 - 18 = 43 and 61 + 18 = 79 are prime.
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[p-n]&&PrimeQ[p+n], AppendTo[lst, p]], {n, 8!}]; lst
Transpose[Select[Table[{n, Prime[n]}, {n, 3100}], And@@PrimeQ[{Last[#]- First[#], Total[#]}]&]][[2]] (* Harvey P. Dale, Nov 04 2011 *)
PROG
(PARI) n=0; forprime(p=2, 1e5, if(isprime(p-n++)&&isprime(p+n), print1(p", "))) \\ Charles R Greathouse IV, Nov 04 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Sep 01 2008
EXTENSIONS
Definition edited by Harvey P. Dale, Nov 04 2011
STATUS
approved