login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Let p=prime=a(n); then a(n+1) = smallest prime q>p such that 2p+q and 2q+p are both primes.
2

%I #14 Apr 06 2019 10:32:28

%S 3,5,7,17,67,107,277,353,487,557,787,797,853,983,1033,1163,1597,1637,

%T 1657,1697,1867,1913,2347,2543,2833,2897,2953,2957,3343,3413,3607,

%U 3623,3643,3863,3907,4013,4447,4583,4987,5087,5113,5507,6277,6653,7027,7433,7603

%N Let p=prime=a(n); then a(n+1) = smallest prime q>p such that 2p+q and 2q+p are both primes.

%H Zak Seidov, <a href="/A215684/b215684.txt">Table of n, a(n) for n = 1..1000</a>

%e 2*3+5=11 and 2*5+3=13 are both prime, so a(2) = 5.

%e 2*7+17=31 and 2*17+7=41 are both prime, so a(4) = 17.

%t a=3;s={a};m=100;Do[n1=PrimePi[a]+1;Do[b=Prime[n];If[PrimeQ[2*a+b]&&PrimeQ[2*b+a],AppendTo[s,b];a=b;Break[]],{n,n1,n1+100000}],{m-1}];s

%t spq[n_]:=Module[{p=NextPrime[n]},While[!PrimeQ[2n+p]||!PrimeQ[2p+n],p=NextPrime[p]];p]; NestList[spq,3,50] (* _Harvey P. Dale_, Apr 06 2019 *)

%Y Cf. A181848.

%K nonn

%O 1,1

%A _Zak Seidov_, Aug 20 2012