Incorrect guess based on limited data: Number of Primes 6k1 > Number of Primes 6k+1
[COLOR="RoyalBlue"][/COLOR][B]Guess based on limited data[/B]: [U]The number of primes of type 6[I]k[/I]1 is greater than the number of primes of type 6[I]k[/I]+1.[/U]
Range, [I]π[/I](Range), [COLOR="Red"]Number of Primes 6[I]k[/I]1[/COLOR], [COLOR="SeaGreen"]Number of Primes 6[I]k[/I]+1[/COLOR], [B][COLOR="royalblue"]Difference[/COLOR][/B] 1,000,000,000, 50,847,534, [COLOR="Red"]25,424,819[/COLOR], [COLOR="SeaGreen"]25,422,713[/COLOR], 25,424,819  25,422,713 = [B][COLOR="royalblue"]2,106[/COLOR][/B] 2,000,000,000, 98,222,287, [COLOR="red"]49,112,582[/COLOR], [COLOR="Seagreen"]49,109,703[/COLOR], 49,112,582  49,109,703 = [B][COLOR="royalblue"]2,879[/COLOR][/B] 3,000,000,000, 144,449,537, [COLOR="red"]72,226,055[/COLOR], [COLOR="Seagreen"]72,223,480[/COLOR], 72,226,055  72,223,480 = [B][COLOR="royalblue"]2,575[/COLOR][/B] ... [I]Note: Primes 2 and 3 are counted in [I]π[/I](Range).[/I] There is a consistent slight difference of a few thousand primes. Is there a simple way to explain said difference? Also, please share if there are existing references related to this matter. (* Wolfram code *) nrange = 3000000000; nmax = PrimePi[nrange]; tpc = 0; tp5 = 0; tp1 = 0; tpother = 0; n = 1; While[(n <= nmax), p = Prime[n]; tpc++; If[Mod[p, 6] == 5, tp5++;, If[Mod[p, 6] == 1, tp1++;, tpother++;];]; n++]; Print[tpc, ", ", tp5, ", ", tp1, ", ", tpother]; 
You've rediscovered a very wellknown phenomenon called [URL="https://en.wikipedia.org/wiki/Chebyshev%27s_bias"]Chebyshev's bias[/URL]. Assuming some strong versions of the Riemann hypothesis, it is known that for most N, there are more primes of the form 2 mod 3 than 1 mod 3 up to N. 1 mod 3 does sometimes take the lead; this first happens at N = 608981813029. The effect relates to the fact that numbers of the form 1 mod 3 can be squares while those of the form 2 mod 3 cannot. In some sense, it's actually the numbers of *primes and prime powers* (edit: with a suitable scaling on the prime powers) that we should expect to be balanced between the two classes, but it's not easy to explain why. See [URL="https://arxiv.org/pdf/math/0408319v1.pdf"]here[/URL] for an overview of the field.
The ratio (primes 1 mod 3)/(primes 2 mod 3) tends to 1, by de la Vallee Poussin's theorem that for any k the primes are evenly distributed among the residue classes mod k that are coprime to k. 
Occasionally, 6k+1 will be exposed to possible factoring by one higher prime than 6k1 is, as least factor > 1. For example 167 is prime and [TEX]sqrt(167)[/TEX] = 12.9228...; 169=13[SUP]2[/SUP].

In the dim past, I posted [url=https://mersenneforum.org/showpost.php?p=492715&postcount=34]here[/url], and recommended reading [url=http://www.dms.umontreal.ca/~andrew/PDF/PrimeRace.pdf]this paper[/url], which is the same as the one linked to in the preceding post to this thread, though at a different URL.

[QUOTE=charybdis;586526]You've rediscovered a very wellknown phenomenon called [URL="https://en.wikipedia.org/wiki/Chebyshev%27s_bias"]Chebyshev's bias[/URL]. Assuming some strong versions of the Riemann hypothesis, it is known that for most N, there are more primes of the form 2 mod 3 than 1 mod 3 up to N. 1 mod 3 does sometimes take the lead; this first happens at N = 608981813029. The effect relates to the fact that numbers of the form 1 mod 3 can be squares while those of the form 2 mod 3 cannot. In some sense, it's actually the numbers of *primes and prime powers* (edit: with a suitable scaling on the prime powers) that we should expect to be balanced between the two classes, but it's not easy to explain why. See [URL="https://arxiv.org/pdf/math/0408319v1.pdf"]here[/URL] for an overview of the field.
The ratio (primes 1 mod 3)/(primes 2 mod 3) tends to 1, by de la Vallee Poussin's theorem that for any k the primes are evenly distributed among the residue classes mod k that are coprime to k.[/QUOTE] Thanks, [B]charybdis[/B], this was useful. It would take several days to reach 608981813029 on a Raspberry Pi 4B device with a compiled Wolfram script. Out of curiosity, I may continue further for some time to observe the tendency after the reversal point. 
The material is nicely presented, however I tend to be careful when I see Granvilles' name (I don't like him much, after many gaffes he did, and after the story with Beal).
Yeah, the two number lines cross infinitely times, however, one "team" is leading "almost" the whole time. Which reminds me of the old joke with two old guys talking on a bench in the park, "how's your sex life these days", "oh, no problem I have sex almost every day", "I don't believe you, I only have it two or three times per year, you are not serious", "of course I am serious, I had sex almost every day", "how come?", "well, Monday I almost had sex, Tuesday I almost had sex, Wednesday I almost had sex, Thursday..." 
100+ years old talk to Doctor
friend of mine tell me, that he can have sex in row at the one night, and I can not, Help me! Ok, its very easy to Help! You just can [B]tell[/B] him that You can do the same too! 
The original paper by Bays and Hudson (1978, available in JSTOR, see [url]https://www.jstor.org/stable/2006165?refreqid=excelsior%3Ac83e4bdacade0e9fd265734d170a779e[/url]) has no mention of several cases for small primes when the numbers of primes of the two types [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) and [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) are equal.
Actually, [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) = [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) for [I]x[/I] = 2, 3, 7, 13, 19, 37, 43, 79, 163, 223 and 229: [I]π[/I][SUB]3,2[/SUB](2) = [I]π[/I][SUB]3,1[/SUB](2) = 0 (trivial case) [I]π[/I][SUB]3,2[/SUB](3) = [I]π[/I][SUB]3,1[/SUB](3) = 0 (trivial case) [I]π[/I][SUB]3,2[/SUB](7) = [I]π[/I][SUB]3,1[/SUB](7) = 1 [I]π[/I][SUB]3,2[/SUB](13) = [I]π[/I][SUB]3,1[/SUB](13) = 2 [I]π[/I][SUB]3,2[/SUB](19) = [I]π[/I][SUB]3,1[/SUB](19) = 3 [I]π[/I][SUB]3,2[/SUB](37) = [I]π[/I][SUB]3,1[/SUB](37) = 5 [I]π[/I][SUB]3,2[/SUB](43) = [I]π[/I][SUB]3,1[/SUB](43) = 6 [I]π[/I][SUB]3,2[/SUB](79) = [I]π[/I][SUB]3,1[/SUB](79) = 10 [I]π[/I][SUB]3,2[/SUB](163) = [I]π[/I][SUB]3,1[/SUB](163) = 18 [I]π[/I][SUB]3,2[/SUB](223) = [I]π[/I][SUB]3,1[/SUB](223) = 23 [I]π[/I][SUB]3,2[/SUB](229) = [I]π[/I][SUB]3,1[/SUB](229) = 24 It seems that the problem is still open for [I]x[/I] > Infinity as there is no strict proof. 
[QUOTE=LaurV;586540]Yeah, the two number lines cross infinitely times, however, one "team" is leading "almost" the whole time.[/QUOTE]
Indeed, it is unclear (at least to me) what happens at [I]x[/I] > Infinity. It could be [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) = [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) + [I]C[/I] for some small nonzero constant [I]C[/I]. Or [I]C[/I]=0? 
[QUOTE=Dr Sardonicus;586528]In the dim past, I posted [url=https://mersenneforum.org/showpost.php?p=492715&postcount=34]here[/url], and recommended reading [url=http://www.dms.umontreal.ca/~andrew/PDF/PrimeRace.pdf]this paper[/url], which is the same as the one linked to in the preceding post to this thread, though at a different URL.[/QUOTE]
[QUOTE=Dr Sardonicus;492715]According to [url=http://www.dms.umontreal.ca/~andrew/PDF/PrimeRace.pdf]Prime Races[/url] [which I recommend reading], 1 mod 6 doesn't take the lead until p = 608,981,813,029.[/QUOTE] The limit of the ratio [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) / [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) would tend to 1 as [I]x[/I] > Infinity for the infinite number of reversals. What I am seeking an answer to is if [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) = [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) + [I]C[/I] for some small nonzero constant [I]C[/I]. 
[QUOTE=Dobri;586573]
[I]π[/I][SUB]3,2[/SUB](2) = [I]π[/I][SUB]3,1[/SUB](2) = 0 (trivial case) [I]π[/I][SUB]3,2[/SUB](3) = [I]π[/I][SUB]3,1[/SUB](3) = 0 (trivial case) [I]π[/I][SUB]3,2[/SUB](7) = [I]π[/I][SUB]3,1[/SUB](7) = 1 ...[/QUOTE] Don't forget 2 is a prime of the form 2 mod 3. [QUOTE=Dobri;586575]Indeed, it is unclear (at least to me) what happens at [I]x[/I] > Infinity. It could be [I]π[/I][SUB]3,2[/SUB]([I]x[/I]) = [I]π[/I][SUB]3,1[/SUB]([I]x[/I]) + [I]C[/I] for some small nonzero constant [I]C[/I]. Or [I]C[/I]=0?[/QUOTE] Littlewood's result from 1914, quoted in Granville and Martin's survey, shows that the difference oscillates from positive to negative infinitely many times, and also takes arbitrarily large positive and negative values. 
All times are UTC. The time now is 16:06. 
Powered by vBulletin® Version 3.8.11
Copyright ©2000  2021, Jelsoft Enterprises Ltd.