A124627 Riemann-Gram approximation to A007097(n+1) using A007097(n).
2, 3, 5, 11, 33, 127, 715, 5345, 52692, 648344, 9737826, 174442666, 3657513487, 88362834417, 2428095525614, 75063691591379, 2586559741900744, 98552043877145945, 4123221751454999891, 188272405177875090033, 9332039515886416792536, 499720579610294249596689, 28785866289101759323472435, 1776891233143817540293248652
Offset: 1
Examples
A007097(17) = 75063692618249; Primex(75063692618249) = 2586559741900744; A007097(18) = 2586559730396077; Primex(2586559730396077) = 98552043877145945; A007097(19) ~ 98552043800000000.
Crossrefs
Cf. A007097.
Programs
-
Mathematica
RiemannGram[x_] := Module[{n = 1, L, s = 1, r}, L = r = Log[x]; While[s < 10^30 r, s = s + r/(Zeta[n + 1] n); n++; r = r L/n]; s]; Primex[n_] := Module[{r1, r2, r, est}, If[n == 1, r = 2, r1 = n Log[n]; r2 = 2 r1; For[i = 1, i < 50, i++, r = (r1 + r2)/2; est = RiemannGram[r]; If[est < n, r1 = r, r2 = r]]]; Round@r]; Primex /@ NestList[Prime, 1, 15] (* Birkas Gyorgy, Apr 04 2011 *)
-
PARI
xeqprimex(n) = { my(a,x); a = [1, 2, 3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, 3657500101, 88362852307, 2428095424619, 75063692618249, 2586559730396077]; for(x=1,n, print1(round(primex(a[x]))",") ) } \\ Approximates the n-th prime number to an accuracy of log10(n)/2 places. primex(n) = { my(x,px,r1,r2,r,p10,b,e,est); if(n==1,return(2)); \\ force to 2 b=10; \\ Select base p10=log(n)/log(10); \\ Determine p10 = power of 10 of n to adjust b^p10 if(Rg(b^p10*log(b^(p10+1)))< b^p10,m=p10+1,m=p10); r1 = 0; r2 = 7.718281828; \\ Real kicker. if r2=1, it fails at 1e117 for(x=1, 100, r=(r1+r2)/2; est = (b^p10*log(b^(m+r))); px = Rg(est); if(px <= b^p10,r1=r,r2=r); r=(r1+r2)/2; ); est; } Rg(x) = \\ Gram's Riemann Approx of Pi(x) { my(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
}
Formula
Primex(n) ~ prime(n). Prime(n) is the n-th prime number. Primex(n) is the Riemann-Gram approximation of Prime(n) accurate to log_10(n)/2 + 1 digits for large n. The sequence is primex(A007097(n)) for n = 1 to 18.
Extensions
a(19) and a(20) found by David Baugh using a program by Xavier Gourdon and Andrey V. Kulsha, Oct 25 2007
a(21), a(22) and a(23) calculated by David Baugh, Feb 10 2015
a(24) calculated by David Baugh, May 16 2016
Comments