OFFSET
1,1
FORMULA
b(n) = If Prime[n+2]+Prime[n]+1 is prime then Prime[n+2]+Prime[n]+1 else Prime[n+1]+Prime[n]+1 a(n)=If b(n) if prime then b(n)
MATHEMATICA
b=Table[If[PrimeQ[Prime[n + 2] + Prime[n] + 1], Prime[n + 2] + Prime[n] + 1, Prime[n + 1] + Prime[n] + 1], {n, 1, 200}] a=Flatten[Table[If[PrimeQ[b[[n]]], b[[n]], {}], {n, 1, 200}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 01 2005
STATUS
approved