OFFSET
1,2
FORMULA
EXAMPLE
n=1: p(2)+p(1) = 3+2 = 5^1
n=2: p(3)+p(2) = 5+3 = 2^3
n=18: p(19)+p(18) = 61+67 = 2^7
n=564: p(565)+p(564) = 4099+4093 = 2^13
MATHEMATICA
Do[s=Prime[n+1]+Prime[n]; If[Equal[Length[FactorInteger[s]], 1], Print[{n, Prime[n], s}]], {n, 1, 10000000}]
p = q = 2; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[q = NextPrim[p]; If[ Length[ Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[p + q]]] == 1, Print[n]]; p = q, {n, 1, 10^7}] (* Robert G. Wilson v, Jan 24 2004 *)
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Labos Elemer, May 21 2002
EXTENSIONS
a(5) added by Max Alekseyev, Feb 10 2011
STATUS
approved