OFFSET
1,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
n=1: 2*prime(1)+prime(1+1)=2*2+3=7 is prime, so a(1)=1;
n=2: 2*prime(2)+prime(2+1)=2*3+5=11 is prime, so a(2)=1;
...
n=4: 2*prime(4)+prime(4+1)=2*7+11=25 is not prime
...
2*prime(4)+prime(4+3)=2*7+17=31 is prime, so a(4)=3.
MATHEMATICA
Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; n2, {n1, 1, 200}]
mnm[n_]:=Module[{m=1, p=2Prime[n]}, While[!PrimeQ[p+Prime[n+m]], m++]; m]; Array[mnm, 110] (* Harvey P. Dale, Aug 05 2017 *)
PROG
(Haskell)
a114266 n = head [m | m <- [1..],
a010051 (2 * a000040 n + a000040 (n + m)) == 1]
-- Reinhard Zumkeller, Oct 29 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 20 2005
EXTENSIONS
Edited definition to conform to OEIS style. - N. J. A. Sloane, Jan 08 2011
STATUS
approved