|
|
A123233
|
|
Difference between the (10^n)-th prime and the Riemann-Gram approximation of the (10^n)-th prime.
|
|
0
|
|
|
1, 0, 5, -4, -39, -24, 1823, -6566, -1844, -34087, 84846, -449836, -1117632, -3465179, -1766196, -11290074, 105510354
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The algorithm in the PARI script below produces the 10^n-th prime accurate to first n/2 places. Conjecture: The sign of the terms in this sequence changes infinitely often. Based on the small sample presented here, it appears the negative terms occur much more often.
|
|
LINKS
|
|
|
FORMULA
|
prime(10^x)-primeRG(10^x), where prime(n) is the n-th prime and primeRG(n)is an approximation of the n-th prime number based on an exponential bisection routine that uses the Riemann-Gram approximation of Pi(x). The flow of the routine is evident in the PARI script below.
|
|
EXAMPLE
|
prime(10) - primeGR(10) = 29 - 29 = 0, the second term.
|
|
PROG
|
(PARI)
primeGR(n) =
\\ A good approximation for the n-th prime number using
\\ the Gram-Riemann approximation of Pi(x)
{ local(x, px, r1, r2, r, p10, b, e); b=10; p10=log(n)/log(10); if(Rg(b^p10*log(b^(p10+1)))< b^p10, m=p10+1, m=p10); r1 = 0; r2 = 7.18281828; for(x=1, 400, r=(r1+r2)/2; px = Rg(b^p10*log(b^(m+r))); if(px <= b^p10, r1=r, r2=r); r=(r1+r2)/2; ); floor(b^p10*log(b^(m+r))+.5); }
Rg(x) =
\\ Gram's Riemann's Approx of Pi(x)
{ local(n=1, L, s=1, r); L=r=log(x); while(s<10^40*r, s=s+r/zeta(n+1)/n; n=n+1; r=r*L/n); (s) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,hard,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|