%I #13 Feb 12 2015 11:29:38
%S 3,5,7,17,19,17,19,23,37,31,41,53,67,53,73,61,61,71,89,97,83,83,97,
%T 103,113,109,107,139,113,127,167,139,157,179,151,197,173,173,223,211,
%U 199,239,211,227,199,233,239,227,229,233,277,241,251,271,283,271,271,281
%N Smallest prime p greater than prime(n) such that 2*prime(n) + p is a prime.
%C Note that p is next prime after prime(n) iff prime(n) is a term in A173971. - _Zak Seidov_, Feb 11 2015
%H Reinhard Zumkeller, <a href="/A114265/b114265.txt">Table of n, a(n) for n = 1..10000</a>
%e n=1: 2*prime[1]+3=2*2+3=7 is prime, so a(1)=3;
%e n=2: 2*prime[2]+5=2*3+5=11 is prime, so a(2)=5;
%e ...
%e n=4: 2*prime[4]+3=2*7+3=17 is prime, so a(4)=17.
%t 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}]
%o (Haskell)
%o a114265 n = head [p | let (q:qs) = drop (n - 1) a000040_list, p <- qs,
%o a010051 (2 * q + p) == 1]
%o -- _Reinhard Zumkeller_, Oct 31 2013
%o (PARI) a(n)=forprime(p=prime(n)+1,,if(isprime(2*prime(n)+p),return(p)))
%o vector(100,n,a(n)) \\ _Derek Orr_, Feb 11 2015
%Y Cf. A114227, A114230, A073703, A114235, A114262.
%Y Cf. A010051, A000040, A173971.
%K easy,nonn
%O 1,1
%A _Lei Zhou_, Nov 20 2005
%E Edited definition to conform to OEIS style. - _Reinhard Zumkeller_, Oct 31 2013