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