In [1]:
keepfloat:true$
assume(x>1)$
texput(moebius,"\\mu")$
declare(rho,complex)$
In [2]:
J(x)=li(x)-sum(li(x^rho[i])+li(x^(conjugate(rho[i]))),i,1,inf)-log(2)+integrate(1/(t*(t^2-1)*log(t)),t,x,inf);
Out[2]:
\[\tag{${\it \%o}_{5}$}J\left(x\right)=-\sum_{i=1}^{\infty }{\left({\it li}\left(x^{\rho_{i}^\star}\right)+{\it li}\left(x^{\rho_{i}}\right)\right)}+{\it li}\left(x\right)+\int_{x}^{\infty }{\frac{1}{t\,\left(t^2-1\right)\,\log t}\;dt}-\log 2\]
In [3]:
pi(x)=sum(moebius(m)/m*J(x^(1/m)),m,1,floor(log(x)/log(2)));
Out[3]:
\[\tag{${\it \%o}_{6}$}\pi\left(x\right)=\sum_{m=1}^{\left \lfloor \frac{\log x}{\log 2} \right \rfloor}{\frac{\mu\left(m\right)\,J\left(x^{\frac{1}{m}}\right)}{m}}\]
In [4]:
pi1[n]:=if n<2 then 0 elseif primep(n) then pi1[n-1]+1 else pi1[n-1]$
In [5]:
pi(x):=if integerp(x) and primep(x) then pi1[x]-1/2 else pi1[floor(x)]$
In [6]:
plot2d(pi(x),[x,0,100])$
Gnuplot Produced by GNUPLOT 5.4 patchlevel 0 x gnuplot_plot_1 0 5 10 15 20 25 0 20 40 60 80 100
In [7]:
J2(x):=expintegral_li(x)-log(2)+romberg(1/(t*(t^2-1)*log(t)),t,x,100);
Out[7]:
\[\tag{${\it \%o}_{10}$}J_{2}\left(x\right):={\it expintegral\_li}\left(x\right)-\log 2+{\it romberg}\left(\frac{1}{t\,\left(t^2-1\right)\,\log t} , t , x , 100\right)\]
In [8]:
pi2(x):=ev(sum(moebius(m)/m*J2(x^(1/m)),m,1,floor(log(x)/log(2))),numer);
Out[8]:
\[\tag{${\it \%o}_{11}$}\pi_{2}\left(x\right):={\it ev}\left({\it sum}\left(\frac{\mu\left(m\right)}{m}\,J_{2}\left(x^{\frac{1}{m}}\right) , m , 1 , \left \lfloor \frac{\log x}{\log 2} \right \rfloor\right) , {\it numer}\right)\]
In [9]:
plot2d([pi(x),pi2(x)],[x,2,1000])$
Gnuplot Produced by GNUPLOT 5.4 patchlevel 0 x fun1 fun1 fun2 fun2 0 20 40 60 80 100 120 140 160 180 100 200 300 400 500 600 700 800 900 1000
In [10]:
expintegral_ei((1/2+%i*t)*log(x))=expintegral_li(x^(1/2+%i*t));
Out[10]:
\[\tag{${\it \%o}_{13}$}{\it expintegral\_ei}\left(\left(i\,t+\frac{1}{2}\right)\,\log x\right)={\it expintegral\_li}\left(x^{i\,t+\frac{1}{2}}\right)\]
In [11]:
draw2d(nticks=1000,
       parametric( realpart(expintegral_ei(expand((1/2+%i*t)*log(20.0)))),
                   imagpart(expintegral_ei(expand((1/2+%i*t)*log(20.0)))),
                   t,-50,50) ,
       color=red,
       parametric( realpart(expintegral_li(rectform(20.0^(1/2+%i*t)))),
                   imagpart(expintegral_li(rectform(20.0^(1/2+%i*t)))),
                   t,0,2.1));
Gnuplot Produced by GNUPLOT 5.4 patchlevel 0 -4 -3 -2 -1 0 1 2 3 4 -0.5 0 0.5 1 1.5 2 2.5 3 gnuplot_plot_1 gnuplot_plot_2
Out[11]:
\[\tag{${\it \%o}_{14}$}\left[ {\it gr2d}\left({\it parametric} , {\it parametric}\right) \right] \]
In [12]:
Li_power(x,t):=2*realpart(expintegral_ei(expand((1/2+%i*t)*log(x))));
Out[12]:
\[\tag{${\it \%o}_{15}$}{\it Li\_power}\left(x , t\right):=2\,{\it realpart}\left({\it expintegral\_ei}\left({\it expand}\left(\left(\frac{1}{2}+i\,t\right)\,\log x\right)\right)\right)\]
In [13]:
/*
The LMFDB Collaboration, The L-functions and Modular Forms Database, 
home page of the Zeros of zeta(s),
https://www.lmfdb.org/zeros/zeta/?limit=200&N=1, 2020 , [Online; accessed 10 October 2020].
*/
img_rho:[
14.1347251417346937904572519835625,
21.0220396387715549926284795938969,
25.0108575801456887632137909925628,
30.4248761258595132103118975305840,
32.9350615877391896906623689640747,
37.5861781588256712572177634807053,
40.9187190121474951873981269146334,
43.3270732809149995194961221654068,
48.0051508811671597279424727494277,
49.7738324776723021819167846785638,
52.9703214777144606441472966088808,
56.4462476970633948043677594767060,
59.3470440026023530796536486749922,
60.8317785246098098442599018245241,
65.1125440480816066608750542531836,
67.0798105294941737144788288965221,
69.5464017111739792529268575265547,
72.0671576744819075825221079698261,
75.7046906990839331683269167620305,
77.1448400688748053726826648563047,
79.3373750202493679227635928771161,
82.9103808540860301831648374947706,
84.7354929805170501057353112068276,
87.4252746131252294065316678509191,
88.8091112076344654236823480795095,
92.4918992705584842962597252418105,
94.6513440405198869665979258152080,
95.8706342282453097587410292192467,
98.8311942181936922333244201386224,
101.3178510057313912287854479402924,
103.7255380404783394163984081086952,
105.4466230523260944936708324141119,
107.1686111842764075151233519630860,
111.0295355431696745246564503099445,
111.8746591769926370856120787167707,
114.3202209154527127658909372761910,
116.2266803208575543821608043120647,
118.7907828659762173229791397026999,
121.3701250024206459189455329704998,
122.9468292935525882008174603307700,
124.2568185543457671847320079661301,
127.5166838795964951242793237669060,
129.5787041999560509857680339061800,
131.0876885309326567235663724615015,
133.4977372029975864501304920426407,
134.7565097533738713313260641571699,
138.1160420545334432001915551902824,
139.7362089521213889504500465233824,
141.1237074040211237619403538184753,
143.1118458076206327394051238689139,
146.0009824867655185474025075964246,
147.4227653425596020495211850104316,
150.0535204207848803514324672369594,
150.9252576122414667618525246783058,
153.0246938111988961982565442551854,
156.1129092942378675697501893101691,
157.5975918175940598875305031584988,
158.8499881714204987241749947755403,
161.1889641375960275194373441293695,
163.0307096871819872433110390006880,
165.5370691879004188300389193548749,
167.1844399781745134409577562462105,
169.0945154155688214895058711814318,
169.9119764794116989666998435958216,
173.4115365195915529598461186493456,
174.7541915233657258133787624558669,
176.4414342977104188888926410578611,
178.3774077760999772858309354141843,
179.9164840202569961393400366120511,
182.2070784843664619154070372269880,
184.8744678483875088009606466172344,
185.5987836777074714665277042683928,
187.2289225835018519916415405861313,
189.4161586560169370848522890998453,
192.0266563607137865472836314255836,
193.0797266038457040474022057943760,
195.2653966795292353214631878148621,
196.8764818409583169486222639146962,
198.0153096762519124249199187022090,
201.2647519437037887330161334275482,
202.4935945141405342776866606378642,
204.1896718031045543307164383863137,
205.3946972021632860252123793906930,
207.9062588878062098615019679077537,
209.5765097168562598528356442898868,
211.6908625953653075639074867307192,
213.3479193597126661906391220210726,
214.5470447834914232229442010725905,
216.1695385082637002658695633544983,
219.0675963490213789856772565904373,
220.7149188393140033691155926339062,
221.4307055546933387320974751192761,
224.0070002546043352117288755285048,
224.9833246695822875037825236805285,
227.4214442796792913104614361606596,
229.3374133055253481077600833060557,
231.2501887004991647738061867700103,
231.9872352531802486037716685391979,
233.6934041789083006407044947325696,
236.5242296658162058024755079556632,
237.7698204809252040032366259263873,
239.5554775733276287402689320343344,
241.0491577962165864128379214103356,
242.8232719342226000168264744588786,
244.0708984970781582368165279898444,
247.1369900748974994675509681792082,
248.1019900601484592567621420846569,
249.5736896447072091923297941887400,
251.0149477950160011429541551037080,
253.0699867479994771945990137856179,
255.3062564549140227530864917940013,
256.3807136944344777893583823397297,
258.6104394915313682089830586447592,
259.8744069896780003506728446138766,
260.8050845045968701859312334724646,
263.5738939048701322330815881310234,
265.5578518388763202924773089641850,
266.6149737815010724957201129738679,
267.9219150828240594403789671721855,
269.9704490239976025946935053188985,
271.4940556416449990181794167575227,
273.4596091884032870457142502988019,
275.5874926493438412487407026193778,
276.4520495031329386798873436383991,
278.2507435298419544927482767113162,
279.2292509277451892284098804519553,
282.4651147650520962330272011865010,
283.2111857332338674204938379433290,
284.8359639809047241331576339226964,
286.6674453630028842928476241464148,
287.9119205014221871552541202718675,
289.5798549292188341527380235693524,
291.8462913290673958355130544246386,
293.5584341393562853567766971060351,
294.9653696192655421750664486390095,
295.5732548789582923884608314587787,
297.9792770619434152099296829576829,
299.8403260537213129600270525252938,
301.6493254621941836234701002084181,
302.6967495896069170517514770953529,
304.8643713408572977001487499031444,
305.7289126020368092892228212616610,
307.2194961281700547894100333999346,
310.1094631467018988047862197679989,
311.1651415303560032709426708003548,
312.4278011806008919804859830928742,
313.9852857311589229790489657545763,
315.4756160894757338685960781439538,
317.7348059423701803956454942049681,
318.8531042563165979066891845477493,
321.1601343091135782919214714174306,
322.1445586724829322988374450059887,
323.4669695575120505062120304147951,
324.8628660517396132649800869954006,
327.4439012619054573434692638163206,
329.0330716804809340336147275768039,
329.9532397282338663438921221886314,
331.4744675826634243756617538663449,
333.6453785248698505849616830808793,
334.2113548332443832324034079591923,
336.8418504283906847946547629194120,
338.3399928508066118862573260871631,
339.8582167253635401923265509308740,
341.0422611110465604825977845985367,
342.0548775103635854514038250940982,
344.6617029402523370441811880981990,
346.3478705660099473959364598161519,
347.2726775844204844757970948880699,
349.3162608706961441231555557339939,
350.4084193491920991876719532344873,
351.8786490253592804367133930765969,
353.4889004887188067836037686094353,
356.0175749772649473179603619607666,
357.1513022520396248096029282322904,
357.9526851016322737551289189827774,
359.7437549531144487992919859769902,
361.2893616958046503902913112277154,
363.3313305789738347473344495666148,
364.7360241140889937162621021269403,
366.2127102883313168610771451968066,
367.9935754817403033261832980442079,
368.9684380957343898915769012998921,
370.0509192121060003396511630612665,
373.0619283721128384491193964312852,
373.8648739109085697447563627336596,
375.8259127667393341079077141466931,
376.3240922306680521171908196124275,
378.4366802499654797240909659132034,
379.8729753465323466510240596904463,
381.4844686171865249196625224236574,
383.4435294495364877043457554807227,
384.9561168148636871037515842087935,
385.8613008459742291805619593598032,
387.2228902223879809759485147381099,
388.8461283542322546008094203003735,
391.4560835636380457705782281225541,
392.2450833395190967490151841709930,
393.4277438444340259366989529201288,
395.5828700109937209708777113231417,
396.3818542225921869319994544917305
]$
In [14]:
J3(x):=
expintegral_li(x)
-sum(Li_power(x,img_rho[i]),i,1,200)
-log(2.0)
+romberg(1/(t*(t^2-1)*log(t)),t,x,20);
Out[14]:
\[\tag{${\it \%o}_{17}$}J_{3}\left(x\right):={\it expintegral\_li}\left(x\right)-{\it sum}\left({\it Li\_power}\left(x , {\it img\_rho}_{i}\right) , i , 1 , 200\right)-\log 2.0+{\it romberg}\left(\frac{1}{t\,\left(t^2-1\right)\,\log t} , t , x , 20\right)\]
In [15]:
pi3(x):=ev(sum(moebius(m)/m*J3(x^(1/m)),m,1,floor(log(x)/log(2))),numer);
Out[15]:
\[\tag{${\it \%o}_{18}$}\pi_{3}\left(x\right):={\it ev}\left({\it sum}\left(\frac{\mu\left(m\right)}{m}\,J_{3}\left(x^{\frac{1}{m}}\right) , m , 1 , \left \lfloor \frac{\log x}{\log 2} \right \rfloor\right) , {\it numer}\right)\]
In [16]:
plot2d([pi3(x),pi(x)],[x,3,200]);
Gnuplot Produced by GNUPLOT 5.4 patchlevel 0 x fun1 fun1 fun2 fun2 0 5 10 15 20 25 30 35 40 45 50 20 40 60 80 100 120 140 160 180 200
Out[16]:
\[\tag{${\it \%o}_{19}$}\left[ \mbox{ /var/folders/3n/jp9c5wkw8xjgmy006s6t\_pt80000gn/T/maxout92067.gnuplot } , \mbox{ /var/folders/3n/jp9c5wkw8xjgmy006s6t\_pt80000gn/T/maxplot.svg } \right] \]
In [ ]: