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”).

A114228
Smallest number m such that prime(n)+2*prime(m) is a prime.
8
1, 2, 1, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 2, 4, 2, 1, 6, 2, 1, 2, 4, 1, 2, 1, 2, 1, 4, 1, 2, 4, 3, 4, 2, 2, 1, 2, 2, 4, 3, 2, 1, 4, 7, 5, 1, 2, 1, 2, 8, 3, 2, 2, 2, 4, 2, 1, 6, 3, 4, 1, 2, 1, 4, 2, 3, 2, 1, 2, 4, 2, 2, 1, 2, 12, 1, 8, 3, 4, 3, 6, 2, 1, 2, 4, 1, 2, 1, 12, 11, 1, 14, 1, 2, 4, 6, 7, 2, 3, 2, 2, 8
OFFSET
2,2
COMMENTS
a(A114229(n)) = n for n >=1 and a(m) <> n for m < A114229(n). - Reinhard Zumkeller, Oct 31 2013
LINKS
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
Cf. A114227.
Sequence in context: A341541 A359953 A330559 * A230287 A336336 A168580
KEYWORD
easy,nonn
AUTHOR
Lei Zhou, Nov 18 2005
STATUS
approved