# $\# \{\text{primes}\ 4n+3 \le x\}$ in terms of $\text{Li}(x)$ and roots of Dirichlet $L$-functions

In a paper about Prime Number Races, I found the following (page 14 and 19):

This formula, while widely believed to be correct, has not yet been proved. $$\frac{\int\limits_2^x{\frac{dt}{\ln t}} - \# \{\text{primes}\le x\} } {\sqrt x/\ln x} \approx 1 + 2\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma}, \tag{3}$$ with $\gamma$ being imaginary part of the roots of the $\zeta$ function.

$\dots$

For example, if the Generalized Riemann Hypothesis is true for the function $L(s)$ just defined, then we get the formula $$\frac{\#\{\text{primes}\ 4n+3 \le x\} - \#\{\text{primes}\ 4n+1 \le x\}} {\sqrt x/\ln x} \approx 1 + 2\sum_{\gamma^\prime} \frac{\sin(\gamma^\prime\ln x)}{\gamma^\prime}, \tag{4'}$$ with $\gamma^\prime$ being imaginary part of the roots of the Dirichlet $L$-function associated to the race between primes of the form $4n+3$ and primes of the form $4n+1$, which is $$L(s) = \frac1{1^s} - \frac1{3^s} + \frac1{5^s} - \frac1{7^s} + \dots.$$

1. Since $$\begin{eqnarray} \# \{\text{primes}\le x\} &=&\# \{\text{primes}\ 4n+3 \le x\} + \#\{\text{primes}\ 4n+1\le x\}\\ &\approx& \text{Li}(x)- \left(\sqrt x/\ln x\right) \left(1 + 2\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma} \right) \end{eqnarray}$$ and assuming the (Generalized) Riemann Hypothesis to be true, is it valid to calculate $$\begin{eqnarray} \# \{\text{primes}\ 4n+3 \le x\} &\approx& \frac{\text{Li}(x)}{2} &-& \frac{\left(\sqrt x/\ln x\right)}{2} \left(1 + 2\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma} \right)\\ &&&+& \frac{\left(\sqrt x/\ln x\right)}{2} \left( 1 + 2\sum_{\gamma^\prime} \frac{\sin(\gamma^\prime\ln x)}{\gamma^\prime} \right)\\ &\approx& \frac{\text{Li}(x)}{2} &+& \left(\sqrt x/\ln x\right) \left(\sum_{\gamma^\prime} \frac{\sin(\gamma^\prime\ln x)}{\gamma^\prime} -\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma} \right), \end{eqnarray}$$ or do the error terms spoil the calculation?

2. Is there another way to get $\# \{\text{primes}\ 4n+3 \le x\}$ using a different Dirichlet $L$-function? How does it look like? Is it possible to treat the general case of $\# \{\text{primes}\ kn+m \le x\}$ the same way?

EDIT From the wiki page on Generalized Riemann hypothesis (GRH), I get:

Dirichlet's theorem states that if a and d are coprime natural numbers, then the arithmetic progression a, a+d, a+2d, a+3d, … contains infinitely many prime numbers. Let π(x,a,d) denote the number of prime numbers in this progression which are less than or equal to x. If the generalized Riemann hypothesis is true, then for every coprime a and d and for every ε > 0 $$\pi(x,a,d) = \frac{1}{\varphi(d)} \int_2^x \frac{1}{\ln t}\,dt + O(x^{1/2+\epsilon})\quad\mbox{ as } \ x\to\infty$$ where φ(d) is Euler's totient function and O is the Big O notation. This is a considerable strengthening of the prime number theorem.

So my example would look like $$\pi(x,3,4) = \frac{1}{\varphi(4)}\text{Li}(x) + O(x^{1/2+\epsilon}),$$ (something that already ask/answered here: Distribution of Subsets of Primes). So the part with the roots seems to be burried in $O(x^{1/2+\epsilon})$, since $\varphi(4)=2$.

Thanks...

-
Some math history from the arXiv: There are infinitely many prime numbers in all arithmetic progressions with first term and difference coprime by Peter Gustav Lejeune Dirichlet – draks ... May 25 '12 at 22:10
Can I use the Dirichlet density $\lim_{s\rightarrow 1^+}{\sum_{p\in A}{1\over p^s}\over \log(\frac{1}{s-1})}$ somehow to get my asymptotics? Looks appealing... – draks ... May 25 '12 at 22:14
The answer to (2) is probably "no" because there is no Dirichlet character that is $1$ on the equivalence class $3\bmod4$ and $0$ otherwise. As for (1), and whether there is any sort of $L$-function to answer (2), I'd have to read more about where the counting asymptotic comes from. – anon May 30 '12 at 23:14
For (2), if you could it do for any $m \bmod k$ and show why it is not possible for others, it'd be ever so happy. Thanks so far. – draks ... May 31 '12 at 5:23
@anon Why is such a Dirichlet character necessary? It would determine the $L$-function, but how to get $\#\{\text{primes } 4n+3\le x\}$ in terms of the roots of that $L$-function from that? – draks ... Jun 4 '12 at 10:48
show 1 more comment

(1) is a correct computation. In general, to treat primes of the form $kn+m$, you would have a linear combination of $\phi(k)$ sums, each of which runs over the zeros of a different Dirichlet $L$-function (of which the Riemann $\zeta$ function is a special case). And yes, assuming the generalized Riemann hypothesis, all of the terms including those sums over zeros can be estimated into the $O(x^{1/2+\epsilon})$ term.

To find out more, you want to look for "the prime number theorem for arithmetic progressions", and in particular the "explicit formula". I know it appears in Montgomery and Vaughan's book, for example.

-
 Thanks for your answer and the reference hint. – draks ... Jun 6 '12 at 6:49 Greg, as Raymond worked out here, the expression for $\pi_{4n+1}^*(x)-\pi_{4n+3}^*(x)\approx -\sum_{\rho} R(x^{\rho})$, with $\rho$ being the roots of the $\beta$ function, introduces some irregualities. We started a chat and would be happy if you could join and bring some light into the dark... – draks ... Jan 30 at 22:48

Here is a table of the 331 first zeros for numerical evaluation (warning: values could be missing...)

6.0209489046975966549025115255,
10.243770304166554552137757473,
12.988098012312422507453109785,
16.342607104587222194976861486,
18.291993196123534838526004279,
21.450611343983460497200948384,
23.278376520459531531819558882,
25.728756425088727567265088675,
28.359634343025327785651607948,
29.656384014593152721809906963,
32.592186527117155130815194045,
34.199957509213146913044795479,
36.142880458303137830565814472,
38.511923141718691293776504680,
40.322674066690544180344394367,
41.807084620004562337157521896,
44.617891058662303393482045721,
45.599584396791566745937702295,
47.741562280939141250781347344,
49.723129323782586066569570883,
51.686093452870528439533811111,
52.768820767804729265035076579,
55.267543584699224846718259652,
56.934374055202296886801711960,
58.116707110673917977262367546,
60.421713949007834673018618295,
62.008632285767769451930615509,
63.714641118785433123518297959,
64.976170573095999348605924739,
67.636920863546068398054991150,
68.365884503834422961233738148,
70.185879908802112061371282120,
72.155484974381881214691542592,
73.767635521485893336154626169,
75.143121647433111405798000424,
76.696303203430199064566659967,
78.809998314320913003691783203,
80.210131238366638915148032664,
81.213951626883151157734833354,
83.666656014470571651283310367,
84.731740363781628608217577601,
86.577660168390264410210548722,
87.629718119587899689039432381,
89.801131616695811325969388292,
91.349703814697573473931013977,
92.237499910454258046004175773,
94.166619585960021307053060933,
96.136011161780558185274479276,
96.961741579417483577607743327,
98.755300415754527668603973554,
100.13488670306768529019231904,
102.14138082688961382675997843,
103.28807538167900270159333920,
104.33326984426745450495085217,
106.69445890889584172960040021,
107.69020697514670020812946699,
110.49960817642909478048490816,
112.36781674401217995716661013,
113.81479554899267353956309211,
116.19320465846121898963013972,
118.53755437884686165780011347,
119.45298987620909035824186237,
120.73129361866037693368487739,
122.44746137906871191967947661,
123.79454876031950609879380618,
125.76851955991559376249639951,
126.29877602494140909790014712,
127.95940768306329938305588877,
129.88562335864546932623503678,
131.09357875408399607523436803,
132.14357660098782788050132120,
133.74418146397481319142376707,
135.49083725255700224755404510,
136.54731226728255838933127345,
138.45729450969625766509038076,
138.75017770461144012954768949,
141.25363250975178412806669861,
142.39441752219778229834700120,
143.32906274161773201159359077,
144.97816627771136218178674826,
146.52200528490833848995838351,
147.93453081218091703481025120,
150.29635900154312145801640888,
151.96198767048369072791846343,
153.69961262351526052550597524,
154.57549142871991733629296692,
155.65024866324343586811534637,
157.74830530790292831907457397,
158.70502112552935112493067703,
160.23648409677104233377768408,
161.40714697615670734528135116,
162.56604668959903962627418377,
164.73116461657689691990755216,
165.40141928586315409461482322,
166.75387916910842711467929232,
168.04442078170974462074284599,
170.05113118752669021484810142,
170.73476699457880545645576325,
172.28048177162133811838196765,
173.44297883613501571697079678,
174.91508808540057340441548453,
176.59730214191806744299558376,
177.70121257457377580802426815,
178.36237490898565560941206095,
180.56931038528553139779449794,
181.61491373170438998090812364,
182.91676832896896722720668364,
184.11503237536838876567103733,
185.37399660770047491721481058,
187.06876059069440954145591925,
188.27137433227075068590376587,
189.49173149212854251358185449,
190.37118761075577274333641876,
192.36113787605631840741605201,
193.79707292614668099455436082,
194.23188322936089922195285019,
196.13200565468428482335296831,
197.11344622157640853776338155,
198.80647573614690671134916226,
200.16203942869863020720223578,
200.90161787076887940260335396,
202.26057799593173083976534604,
204.22107078015820641522076416,
204.99200345509828370916637889,
206.41191104761124331431101684,
207.31737748188785830627423332,
209.22775249264801305239596646,
210.10318551739854017072638068,
211.83341182042389919211672672,
212.53760753721342419767373639,
213.76184210127810212713458895,
215.79381838201559960577042888,
216.70341526620296547634366018,
217.58193141803801709611175843,
220.40562171063697515795993634,
221.92854850725447804914936995,
223.00310318062916135528239779,
224.12223848794683215004758755,
225.29326147520535806546186025,
226.98818848837537471961421291,
228.40550629743637922559802583,
228.95902363267523675101910098,
230.33013057780480230594069311,
232.10048174706901195203683135,
233.04806374529880402510570392,
234.35178770183278559126691643,
235.83621877114146878871598106,
236.24156049447563754765718358,
238.53711304998262144198336571,
239.33848813561967049191160837,
240.62671116939306732194741836,
241.47792092821119586131445270,
243.22893117973858440259094571,
244.51316858358815891067982334,
245.56488138011395915721891054,
246.72405853472513520671442287,
247.99511858273842666345737680,
249.18450896488545637926359681,
251.08656315045619512213120503,
251.63691583961430554302515677,
252.62344577966837570410866022,
254.31443735012273900901544828,
255.83791804974205189835948383,
256.50458494734840573390589089,
258.16526285035121855236577743,
258.83447052352496550977190962,
260.43047213492557515755933298,
261.91361498764980573464503310,
262.88361734246063150509166818,
264.05425788812825390396163665,
264.93285914122008364534327761,
267.00065119971523220684196260,
267.80144698460232962989982417,
268.78330606204792631747966001,
270.27808716748190417041357469,
271.25498369444883796265227849,
272.75587860169341823184636255,
274.17145831251909085018642460,
275.03310123658021403265232025,
275.85894601108307686333373631,
277.77232263831925417841397013,
278.80368388728653858809887697,
280.15714487097460512335476030,
280.79310694940911465165921265,
282.37964046356129969375983170,
283.60454343388307793996827161,
284.92559582341671675890997136,
286.08023330771695304124563007,
287.14942464824185193072788536,
287.97847626332132927976356976,
290.25214699517454327999080838,
290.67729632326071525164544826,
291.83202458884475548513071512,
293.20243417747287711021312313,
294.32726845145976737666041017,
295.80347082471925776988952183,
296.90066613885493288162667737,
298.07887411489226009930190937,
298.87032030707756002676910778,
300.43445985053453461820420384,
301.91984252859711814323532054,
302.91793758311719513681600129,
303.66111804033389116484131301,
305.06520886541900440815050046,
306.79513396371212102425959963,
307.28608493671484668789621993,
309.12248303042252096412050493,
309.73990761397483015859790586,
310.82367496094542226066492277,
312.55636686756100688064634699,
313.87794245506793787784240517,
314.43316516928890292103837772,
315.73498612492696188725190719,
317.01231804223259726515461799,
318.45621725635502024358202211,
319.57969129703539985620862417,
320.40630364449298983627652971,
322.00196780449032992290146609,
322.53911742379191664486892560,
324.51844467372429468247621743,
325.47478404410633875373192686,
326.45854121986539504473910264,
327.25993176651157705164654818,
329.20009793757918038019912741,
330.03604959034586362558252897,
331.21140289958185800530565896,
332.57294652823343974554556525,
333.18150832869444693922851618,
334.76869989467941751441968305,
336.15271755443328443350210094,
337.13966305477713627524956702,
338.22628268603666690396333911,
339.01125261519977890816451524,
340.84195235235292162066710614,
342.02615318336469741374106741,
342.68585823735877067928271577,
344.0836661565686862627004762,
345.2097753413459573044110626,
346.2627604671016941476647978,
347.9246481143632697374566129,
348.9817983885468120149499228,
349.4343424566002814630006007,
350.9772131093086171005228543,
352.3917682431248441639303136,
353.6933333256829546124685137,
354.3017377414641314355505898,
355.7444402625970306431358347,
356.6276472137673985753141096,
358.2882750929424366211009481,
359.0964611926055643566214138,
360.7110410245589243479893582,
361.1974930362084806074524790,
362.2769688931667497705396854,
364.4197244318352155945317356,
364.8037360921119966497987857,
366.0496895182690012543463580,
367.1255349350747462262053663,
368.4338148898077761672916077,
369.5016933318964405363710183,
371.0690160905648737699591025,
371.7700959151502466275535791,
372.8848608865911226393246899,
373.9348689154616523799502265,
375.5468747270075926960247017,
376.6839009379746539367477905,
377.5592232741848044307652399,
378.3869290457616630146695094,
380.0570731823139939966249588,
381.0486701230352553532850229,
382.2397664190157338254422377,
383.4850923542027975470084695,
384.3728456816805919723012968,
385.2152276718100110520672671,
387.1492092876308094595627758,
388.0821424777153497850755292,
388.7777179618526297788291030,
390.1691126288973758248577388,
391.0819257199607056364820762,
392.8517629133617494151722895,
393.4434077110107140920915261,
394.8199970917935633992004384,
395.8046096034178296276558608,
396.7344554225485063080197069,
398.2504159767379466957124019,
399.5655109221428371501170699,
400.6928757687115794343838349,
400.8264309422547318135722239,
402.8183184588996972949913858,
403.9074050434836080884771320,
404.9455862206118613759957847,
406.1612477978882182837592234,
407.1450155618871805968322187,
408.0395266729539842871170633,
409.5882131208357647653279288,
410.8716628634833972562447402,
411.6605714508530686255969330,
412.7311469575827245352595916,
413.6692853952956581370774306,
415.4292958729206053433345755,
416.3705912266159986762147974,
417.1292702136133141970538904,
418.5574767268274943568745235,
419.4874594223070529595380503,
420.5289538979833121243014068,
422.5103730295799395812912385,
422.6872546051342268536572665,
424.0668954927375279116779846,
424.8233888200049631864585039,
426.7324170086494599710725394,
427.3840178113418017106211713,
428.6981079540674684462150564,
429.5893859724852216637696316,
430.6175578358959205969367714,
432.0607725159701751635973864,
433.0374431195775491061980546,
434.4393523989532303725779273,
435.3481541603433508857855094,
435.9041636774496664998333698,
437.5822193991931840771232678,
439.1581082551973744286998591,
439.5375694451764723240134399,
440.6772278998545002559418857,
442.1697399171824047073380865,
442.7770442912218304593990887,
444.4382905078887461488730008,
445.4637391684133745717113130,
446.4483316219370803911040887,
447.3020089048109206937709813,
448.5069310886578395843178830,
450.0566203069175123775802095,
451.0707759054247023168568904

-
Thanks once more, how did you calculate that? I mean what software did you use? – draks ... Jan 7 at 18:41
@draks... I used some quick and dirty scripts I wrote for pari/gp. The 'dirty' part means that I could have missed some zeros (searching alternating signs of the real part in fixed intervals of $0.01$ and $0.005$ so that zeros could have been overlooked... probably not many). – Raymond Manzoni Jan 7 at 20:02
I think I'll have to get a hand on that pari/gp... – draks ... Jan 7 at 20:51