OFFSET
1,1
COMMENTS
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (A116886(n))^2 + 4.
EXAMPLE
Prime q=13=p^2+4 (p=3) and r=q^2+4=13^2+4=173 (prime).
Prime q=293=p^2+4 (p=17) and r=q^2+4=293^2+4=85853 (prime).
MATHEMATICA
Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[PrimeQ[q = p^2+4] && PrimeQ[q^2+4], Print[q]; Sow[q]]]][[2, 1]] (* Jean-François Alcover, Nov 07 2013 *)
Select[Prime[Range[2000]]^2+4, AllTrue[{#, #^2+4}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 13 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 08 2009
STATUS
approved