OFFSET
2,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
EXAMPLE
prime(2)=3, 3+2*prime(1)=7 is prime, so a(2)=1;
prime(3)=5, 5+2*prime(2)=11 is prime, so a(3)=2;
...
prime(20)=71, 71+2*prime(6)=97 is prime, so a(20)=6.
MATHEMATICA
Table[p1 = Prime[n1]; n2 = 1; p2 = 2; While[ cp = p1 + 2*p2; ! PrimeQ[cp], n2++; p2 = Prime[n2]]; n2, {n1, 2, 201}]
PROG
(Haskell)
a114228 n = head [m | m <- [1..],
a010051 (a000040 n + 2 * a000040 m) == 1]
-- Reinhard Zumkeller, Oct 31 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 18 2005
STATUS
approved