OFFSET
1,1
COMMENTS
Note that p is next prime after prime(n) iff prime(n) is a term in A173971. - Zak Seidov, Feb 11 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
n=1: 2*prime[1]+3=2*2+3=7 is prime, so a(1)=3;
n=2: 2*prime[2]+5=2*3+5=11 is prime, so a(2)=5;
...
n=4: 2*prime[4]+3=2*7+3=17 is prime, so a(4)=17.
MATHEMATICA
Table[p1 = Prime[n1]; n2 = 1; p2 = Prime[n1 + n2]; While[cp = 2*p1 + p2; ! PrimeQ[cp], n2++; p2 = Prime[n1 + n2]]; p2, {n1, 1, 200}]
PROG
(Haskell)
a114265 n = head [p | let (q:qs) = drop (n - 1) a000040_list, p <- qs,
a010051 (2 * q + p) == 1]
-- Reinhard Zumkeller, Oct 31 2013
(PARI) a(n)=forprime(p=prime(n)+1, , if(isprime(2*prime(n)+p), return(p)))
vector(100, n, a(n)) \\ Derek Orr, Feb 11 2015
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