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

Good approximation to the 10^n-th lower twin prime.
1

%I #5 Oct 28 2021 13:09:16

%S 100,3380,75610,1257632,18456351,252177334,3285912624,41374714817,

%T 507584081641,6100475249386,72109024427766,840671492062887,

%U 9687559620379066,110531285543842366,1250315111094881329

%N Good approximation to the 10^n-th lower twin prime.

%C a(10) = 6100475249386 has relative 0.000000698 error from the actual value 6100479510551.

%H Cino Hilliard, <a href="http://groups.google.com/group/sumprimes/web/sumtwinsfirstn-c">Counting and summing primes</a>

%H Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/twins/t2_0000.htm">Enumeration of twin primes less than 1e16</a>

%F Pi2(n) = number of twin primes <= n.

%F Twinpi(n) = number of twin prime pairs < n

%F Li_2(n)=intnum(t=2,n,2*c_2/log(t)^2)

%F The relationship n = Pi2(twinpi(n)) is used with a bisection routine where

%F Pi2(n) is the Hardy-Littlewood integral approximation for number of twin

%F primes

%o (PARI) g(n) = {

%o print1(floor(twinx2(10)),",");

%o for(x=2,n,y=twinx(10^x);print1(floor(y)","))

%o }

%o twinx(n) =

%o {

%o local(r1,r2,r,est);

%o r1 = n;

%o r2 = n*n;

%o for(x=1,100,

%o r=(r1+r2)/2.;

%o /*Hardy-Littlewood integral approximation for pi_2(x).*/

%o est = Li_2(r);

%o if(est <= n,r1=r,r2=r);

%o );

%o r;

%o }

%o twinx2(n) =

%o {

%o local(x,tx,r1,r2,r,pw,b,e,est);

%o if(n==1,return(3));

%o b=10;

%o pw=log(n)/log(b);

%o m=pw+1;

%o r1 = 0;

%o r2 = 7.213;

%o for(x=1,100,

%o r=(r1+r2)/2;

%o est = b^(m+r);

%o tx = Li_2(est);

%o if(tx <= b^pw,r1=r,r2=r);

%o );

%o est;

%o }

%o Li_2(x)=intnum(t=2,x,2*0.660161815846869573927812110014555778432623/log(t)^2)

%K nonn

%O 1,1

%A _Cino Hilliard_, Oct 29 2008