cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

100, 3380, 75610, 1257632, 18456351, 252177334, 3285912624, 41374714817, 507584081641, 6100475249386, 72109024427766, 840671492062887, 9687559620379066, 110531285543842366, 1250315111094881329
Offset: 1

Views

Author

Cino Hilliard, Oct 29 2008

Keywords

Comments

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

Programs

  • PARI
    g(n) = {
    print1(floor(twinx2(10)),",");
    for(x=2,n,y=twinx(10^x);print1(floor(y)","))
    }
    twinx(n) =
    {
    local(r1,r2,r,est);
    r1 = n;
    r2 = n*n;
    for(x=1,100,
    r=(r1+r2)/2.;
    /*Hardy-Littlewood integral approximation for pi_2(x).*/
    est = Li_2(r);
    if(est <= n,r1=r,r2=r);
    );
    r;
    }
    twinx2(n) =
    {
    local(x,tx,r1,r2,r,pw,b,e,est);
    if(n==1,return(3));
    b=10;
    pw=log(n)/log(b);
    m=pw+1;
    r1 = 0;
    r2 = 7.213;
    for(x=1,100,
    r=(r1+r2)/2;
    est = b^(m+r);
    tx = Li_2(est);
    if(tx <= b^pw,r1=r,r2=r);
    );
    est;
    }
    Li_2(x)=intnum(t=2,x,2*0.660161815846869573927812110014555778432623/log(t)^2)

Formula

Pi2(n) = number of twin primes <= n.
Twinpi(n) = number of twin prime pairs < n
Li_2(n)=intnum(t=2,n,2*c_2/log(t)^2)
The relationship n = Pi2(twinpi(n)) is used with a bisection routine where
Pi2(n) is the Hardy-Littlewood integral approximation for number of twin
primes