OFFSET
1,1
COMMENTS
The resulting prime can never be a twin prime since the odd number preceding it is divisible by three and the following odd number is a perfect square.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
p^2 + 4*p + 2.
EXAMPLE
(3*5) + (3+5) = 23.
MATHEMATICA
NextPrim[n_] := Block[ {k = n + 1}, While[ !PrimeQ[k], k++ ]; Return[k]]; k = 1; Do[k = NextPrim[k]; If[ PrimeQ[k + 2], p = k*(k + 2) + 2k + 2; If[ PrimeQ[p], Print[p]]], {n, 1, 700} ]
f[n_]:=Module[{x=Total[n]+Times@@n}, If[PrimeQ[x], x, 0]]; Select[f/@ (Select[Partition[Prime[Range[700]], 2, 1], Last[#]-First[#]==2&]), #!=0&] (* Harvey P. Dale, May 11 2011 *)
PROG
(PARI) { n=p=0; for (m=1, 10^9, p=nextprime(p + 1); if (isprime(q=p + 2) && isprime(a=p*q + p + q), write("b065017.txt", n++, " ", a); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 03 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Stephan Wagler (stephanwagler(AT)aol.com), Nov 01 2001
EXTENSIONS
Offset changed from 0 to 1 by Harry J. Smith, Oct 03 2009
STATUS
approved