login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A179288
a(n) is the smallest prime number p that makes both 2p + prime(n) and p + 2*prime(n) prime numbers.
1
5, 3, 3, 31, 3, 3, 5, 7, 139, 5, 5, 19, 23, 3, 3, 19, 5, 3, 139, 3, 5, 7, 19, 3, 31, 5, 37, 11, 7, 23, 31, 7, 5, 61, 11, 3, 5, 3, 3, 31, 5, 19, 3, 7, 41, 11, 3, 3, 5, 37, 79, 5, 61, 7, 37, 19, 5, 3, 79, 5, 7, 3, 19, 17, 7, 11, 53, 127, 41, 3, 109, 17, 5, 11, 3, 79, 17, 19, 5, 19, 11, 151, 17, 5, 67, 79, 5, 19, 107, 37, 61, 17, 109, 11, 3, 31, 61, 17, 11, 23
OFFSET
2,1
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
Sequence in context: A276759 A079799 A257378 * A021871 A309611 A348434
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Jan 05 2011
STATUS
approved