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.
%I A123233 #31 Jul 04 2024 03:33:57 %S A123233 1,0,5,-4,-39,-24,1823,-6566,-1844,-34087,84846,-449836,-1117632, %T A123233 -3465179,-1766196,-11290074,105510354,-208774399,704933861 %N A123233 Difference between the (10^n)-th prime and the Riemann-Gram approximation of the (10^n)-th prime. %C A123233 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. %F A123233 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. %F A123233 a(n) = A006988(n) - A121046(n) for n >= 1. - _Amiram Eldar_, Jul 04 2024 %e A123233 a(1) = prime(10) - primeGR(10) = 29 - 29 = 0. %o A123233 (PARI) %o A123233 primeGR(n) = %o A123233 \\ A good approximation for the n-th prime number using %o A123233 \\ the Gram-Riemann approximation of Pi(x) %o A123233 { 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); } %o A123233 Rg(x) = %o A123233 \\ Gram's Riemann's Approx of Pi(x) %o A123233 { 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) } %Y A123233 Cf. A006988, A121046. %K A123233 sign,hard,more %O A123233 0,3 %A A123233 _Cino Hilliard_, Oct 06 2006 %E A123233 a(17)-a(18) from _Amiram Eldar_, Jul 04 2024