OFFSET
2,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
EXAMPLE
n=2, prime(2)+2*prime(2-1)=3+2*2=7 is prime, so a(2)=1;
n=3, prime(3)+2*prime(3-1)=5+2*3=11 is prime, so a(3)=1;
...
n=17, prime(17)+2*prime(17-9)=59+2*19=97 is prime, so a(17)=9.
MATHEMATICA
Table[p1 = Prime[n1]; n2 = n1 - 1; p2 = Prime[n2]; While[cp = p1 + 2*p2; ! PrimeQ[cp], n2--; If[n2 == 0, Print[n1]]; p2 = Prime[n2]]; n1 - n2, {n1, 2, 201}]
PROG
(Haskell)
a114231 n = head [m | m <- [1..],
a010051 (a000040 n + 2 * a000040 (n - m)) == 1]
-- Reinhard Zumkeller, Oct 31 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 18 2005
EXTENSIONS
Edited definition to conform to OEIS style. - Reinhard Zumkeller, Oct 31 2013
STATUS
approved