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”).
%I #18 Jan 04 2025 16:30:18
%S 1,3,5,7,9,11,15,17,19,21,25,29,31,35,37,39,49,51,55,57,59,61,69,73,
%T 77,79,81,89,91,95,103,105,107,117,119,121,125,129,131,135,139,141,
%U 149,151,155,157,165,169,171,179,183,191,195,197,199,201,205,207,217,219,221,231,239
%N a(1)=1, then a(n) = least number > a(n-1) such that 2*a(n-1)+a(n) is prime.
%C I conjecture that any initial term a(1) eventually merges with this sequence.
%H Harvey P. Dale, <a href="/A256862/b256862.txt">Table of n, a(n) for n = 1..1000</a>
%t a=1;s={a};Do[x=a+1+Mod[a,2];While[!PrimeQ[2*a+x],x=x+2];s={s,x};a=x,{100}];s=Flatten[s]
%t lngp[n_]:=Module[{k=n+1},While[!PrimeQ[2n+k],k++];k]; NestList[lngp,1,70] (* _Harvey P. Dale_, Jan 04 2025 *)
%o (PARI) v=[1];n=2;while(#v<100,if(isprime(2*v[#v]+n),v=concat(v,n));n++);v \\ _Derek Orr_, Apr 14 2015
%K nonn,easy,changed
%O 1,2
%A _Zak Seidov_, Apr 11 2015