OFFSET
1,1
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 3 since 3 + 2 = 5 and prime(5) + 2 = 13 are both prime, but 2 + 2 = 4 is not.
MATHEMATICA
p[n_]:=PrimeQ[n+2]&&PrimeQ[Prime[n+2]+2]
In[2]:= n=0; Do[If[p[Prime[m]], n=n+1; Print[n, " ", Prime[m]]], {m, 1, 10000}]
Select[Prime[Range[2600]], AllTrue[{#+2, Prime[#+2]+2}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 21 2021 *)
PROG
(PARI) s=[]; forprime(p=2, 24000, q=p+2; if(isprime(q) && isprime(prime(q)+2), s=concat(s, p))); s \\ Colin Barker, Jan 26 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 26 2014
STATUS
approved