OFFSET
1,1
COMMENTS
Or, p prime such that p+2 and p^2-2 are primes.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
3, 5 and 3*5-3-5=7 are prime; 5, 7 and 5*7-5-7=23 are prime; 29, 31 and 29*31-29-31=839 are primes.
MATHEMATICA
Clear[lst, f1, f2, n, p]; f1[n_]:=PrimeQ[n+2]; f2[n_]:=PrimeQ[n*(n+2)-((n+2)+n)]; lst={}; Do[p=Prime[n]; If[f1[p]&&f2[p], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 19 2009 *)
tpQ[{a_, b_}]:=b-a==2&&PrimeQ[a*b-a-b]; Transpose[Select[Partition[ Prime[ Range[ 1300]], 2, 1], tpQ]][[1]] (* Harvey P. Dale, May 22 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 10 2007
STATUS
approved