OFFSET
2,1
LINKS
Zak Seidov, Table of n, a(n) for n = 2..1001
EXAMPLE
For n=2, prime(n)=3, and a(n)=5 because 2x3+5=11 and 3+2x5=13 are prime;
For n=3, prime(n)=5, and a(n)=3 because 2x5+3=13 and 5+2x3=11 are prime;
...
for n=9, prime(n)=23, and a(n)=7 because 2*23+7=53 and 23+2*7=37 are prime.
MATHEMATICA
f[n_] := Block[{i = 2, p = Prime[n + 1]}, While[q = Prime[i]; !PrimeQ[2 p + q] || !PrimeQ[p + 2 q], i++]; q]; Array[f, 60] (* Robert G. Wilson v, based on Lei Zhou's program, Jan 05 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Jan 05 2011
STATUS
approved