simple proof to explain the "shocking" news about primes last digits not being random
Mar 16, 2016 39 Replies
J
Jamie M
Ok another new idea that still has to be verified:
For primes ending in 7 within a primorial30 block the chance of two primes ending in 7 should be 19.6% I am pretty sure.. the discrepancy with the 17.757% comes from consecutive primes that cross from one primorial block into another, and/or in a higher primorial ie primorial
210 block.
Most consecutive primes that end in 7 will be *within* a specific primorial block of numbers, but some will cross from one primorial block into the next, and if they do this, then they have to graduate up to the next primorial ie if consecutive primes ending in 7 cross from one primorial30 block to the next, then they go in the primorial210 block, and IF they crossed the fifth primorial30 block, they also will go in the primorial 30030 block! These primes that cross primorial blocks are what changes the 19.6% value down to 17.757% I think.
Here is an example of primorial blocks and how they can be crossed by consecutive primes.
(primorial210) primorial210 block has 7 primorial 30 blocks within it.
So if there are a pair of consecutive primes, they could be within a single primorial30 block, or across two consecutive primorial30 blocks, or in a single primorial210 block, or across two primorial210 blocks, or in a single primorial30030 block, or across two primorial30030 blocks etc.. and each time the block size increases, the probability of the two consecutive primes ending in digit 7 gets closer to 25%.
But to get the overall likelihood of everything all the primorial block sizes should be taken into account, as well as the frequency that primes cross from one block to another etc..
Just more speculating anyway still gotta verify all this.
cheers, Jamie
Didn't find your answer? Ask the community — no account required.
D
David Bernier
I can reproduce the 17.757% for "7 7" (mod 10) like this, using PARI/gp:
I just wrote this, maybe it can be used to get the 17.757% if it is correct?
The probability of two consecutive primes that end in 7 occurring should depend on which primorial grouping the two primes occur in counted from one. If the two primes cross 30 number spacing then they will be in a larger primorial ie 210. Any time one of the spacing is crossed to a larger primorial, the likelihood of the consecutive primes occuring with the same last digit gets closer to 25% since eulerphi(primorial), which is the number of equations that can produce prime numbers within the primorial grouping increases. The primorial groupings all start at one and go up: ((6)(6)(6)(6)(6))=(30) (30)(30)(30)(30)(30)(30)(30)=(210) (210) * 11 times = (2310)
If consecutive primes ending with digit 7 cross one of those groupings then it is in a higher/larger grouping with more equations, and thus closer to 25% equal distribution of consecutive 1,3,7,9 digits.
cheers, Jamie
D
David Bernier
I found 10^20 a bit big. For pairs of consecutive primes p_k , p_{k+1} in the range 10^18, 10^18 + 10^9, I find
6030113 cases of (7, x) (mod 10), where x is one of
1, 3, 7, 9 and 1269493 cases of (7, 7) (mod 10), for a conditional probability of
21.06 % chance of (7, 7) given a (7, x) pair, modulo 10:
I guess it would be good to try a range that your computer can handle, do you get other results different from 17.757% ie for up to 1billion or up to 4billion?
cheers, Jamie
S
Sylvia Else
But you haven't proved it. Your proof is fundamentally flawed.
Sylvia.
J
Jamie M
Hi,
This makes sense from what I was saying, since as the number gets bigger, the primes are spaced further apart, and thus it is more likely that the two consecutive primes occupy a higher primorial block with more equations that produce all the primes given by eulerphi(primorial). So the distribution approaches 25% as the primes spread out and occupy bigger primorial blocks.
cheers, Jamie
J
Jamie M
Repost >> If we look instead at the block of primes from 10^20 to 10^20 + 10^9, >> the probability of "7 7" (mod 10) given a "7" (mod 10) should >> be closer to 25% . But by how much? > > I found 10^20 a bit big. For pairs of consecutive primes > p_k , p_{k+1} in the range 10^18, 10^18 + 10^9, I find > > 6030113 cases of (7, x) (mod 10), where x is one of > 1, 3, 7, 9 and 1269493 cases of (7, 7) (mod 10), > for a conditional probability of > 21.06 % chance of (7, 7) given a (7, x) pair, modulo 10: > > ? c77 = 0; c7 = 0; lastp= 1000000000000000003 ; forprime(q = > 1000000000000000004, 1000000001000000000, rc=q%10; rl=lastp%10; > if(abs(rl-7) > > 6030113 1269493 > 21.052557389886391847051622415699341 > > dave >
Hi,
This makes sense from what I was saying, since as the number gets bigger, the primes are spaced further apart, and thus it is more likely that the two consecutive primes occupy a higher primorial block with more equations that produce all the primes given by eulerphi(primorial). So the distribution approaches 25% as the primes spread out and occupy bigger primorial blocks.
cheers, Jamie
J
Jamie M
Hi,
If you can do this I think you might find a surprising result:
If you segment the large number into groups of 30 numbers starting at 1, then the probability of "7 7" repeating last digit primes within those
30 numbers should remain constant (2/8 + 1/7)/2= 0.196 19.6% I think no matter what large number you test at, as long as it is done within the segmented 30 number primorial blocks.
cheers, Jamie
D
David Bernier
The authors of the arxiv preprint, Lemke Oliver and Soundararajan, say their heuristic argument is based on the Hardy-Littlewood prime k-tuples conjecture :
<
formatting link
> .
dave
pub 4096R/41C769D6 2014-11-04
uid David Bernier (doubledeckerpot5)
J
Jamie M
Hi,
I think the whole statistics of the prime distribution should be explainable by assuming the primes are totally randomly filled into deterministic locations given by primorial formulas.
ie.
y = 30x + 1 y = 30x + 7 y = 30x + 11 y = 30x + 13 y = 30x + 17 y = 30x + 19 y = 30x + 23 y = 30x + 29
Out of every consecutive 30 numbers there are 8 repeating locations that primes can occur, all 22 other locations never have primes up to infinity for each 30 number group.
Filling these 8 locations with primes randomly, using the prime counting function for the probability of how many locations are filled for a given x, probably can explain all prime distribution statistics and if not then there is some non-random pattern to the prime distribution I think.
There seems to be lots of opportunity to waste time thinking about all this stuff anyway its still a mystery :D
cheers, Jamie
J
Jamie M
Hi,
For these eight equations:
y = 30x + 1 y = 30x + 7 y = 30x + 11 y = 30x + 13 y = 30x + 17 y = 30x + 19 y = 30x + 23 y = 30x + 29
that produce all primes, here is the statistical distribution for how often the 8*8=64 permutations of the equations occur consecutively when producing primes:
7 to 11 transition is most common with 2945 occurrences, and the 29 29 consecutive primes are least common with 221 occurrences.
This makes sense since the primes that are spaced closer together occur more frequently, but maybe there are additional patterns in this distribution too.
cheers, Jamie
J
Jamie M
Carrying on from the last post:
7 17 1624
17 7 724
17 17 265
7 7 260
Those are the 4 possible consecutive primes with digits ending in 7 and how often they occur. The sum of all the above counts is 78494, and the end digit 7?s have 2873 as their combined count, which is 3.6% of the overall count.
This closely matches the formula for probability of what would be expected, generated by this python code that gives the probability of having K consecutive samles in a population of N in M draws (python code by Ludvig Ericson)
%matplotlib inline from functools import reduce import operator prod = lambda L: reduce(operator.mul, L, 1.0) def p(N, K, M): return sum(K/prod(N ? k ? i for k in range(K))*prod((N-K-j)/(N-j) for j in range(i)) for i in range(M-K+1)) p(8,2,2) #two consecutive out of 8, with first 2 picked
output: 0.03571428571428571 (close to 3.6%)
For the example of primes ending in 3?s:
13 23 1590
23 13 720
13 13 274
23 23 226
The sum of counts is 2810, and 2810/78494 = 3.579%
For primes ending in 9?s:
19 29 2154
29 19 519
19 19 261
29 29 221
The sum of counts is 3155, and 3155/78494 = 4.019%
Have a total of 12051 counts and 12051/78494=15.35%
So one quarter of the possible groups of consecutive primes (16 of the
64) occur only about 15.35% of the time, (as opposed to the expected 25%) whereas the other 48 consecutive primes with non-matching least digits occur more often that would be expected.
So can probability and/or combinatorics explain this?
cheers, Jamie
G
Gottfried Helms
It seems to be the most simple formula to determine the number of equations, and I'd understood that such a simple formula was part of your question.
Gottfried
G
Gottfried Helms
Am 16.03.2016 um 17:51 schrieb Jamie M:
No, it is simply part of the output of Pari/GP (the implicite numbering of the output of the formulae)
Gottfried
M
Martin Brown
Thanks for that. One of the most striking things about it is that p(a=1,b=9) and p(a=9,b=1) are radically different. Numbers taken from the paper and put into Excel for a quick look see.
It probably would take pari/gp close to the same time to compute all last-digit-to-last-digit transition counts, as for one or two particular pairs. Below are some transition counts based on the 40 million primes following 10^15. (Note, the rightmost column is a row total, but the first row is one short, there being one less transition than the total number of primes considered).
The number of 1-1, 3-3, 7-7, and 9-9 transitions were about
20.6%, 20.4%, 20.4%, and 20.6%, respectively, of the transitions from 1, 3, 7, and 9.
The number of 1-3, 3-7, 7-9, and 9-1 transitions were about
28%, 27%, 28%, and 29%, respectively, of the transitions from
1, 3, 7, and 9.
Both of those results are in line with the idea that the last digit of a prime's successor prime are more likely to be a nearby value, instead of a more-distant value. For a prime p with last digit p%10,
3 of every 4 {1,3,7,9}-spots are closer to p than are {p%10}-spots.
Here's a table of percentages of transitions (from units digit as shown in left column, to units digit as in the heading line) for numbers from n# to 2*(n#) with n=29 (so nLo=6469693230, nHi=12939386460). : 1 3 7 9 1: 19.04 29.25 29.39 22.32 70397392 3: 24.27 18.50 27.85 29.38 70399939 7: 25.43 26.82 18.49 29.26 70401458 9: 31.25 25.43 24.28 19.04 70398938
jiw
G
Gottfried Helms
P(a=1,b=9) are primegaps of length 8 + k*10 P(9=1,b=1) are primegaps of length 2 + j*10
Primegaps of length 2 are more frequent than that of length 8 Primegaps of length 12 are more frequent than that of length 18 ... summary: 2,12,22,32,... more frequent than 8,18,28,38,...
( see a graph of that at:
formatting link
)
That's my intuitive explanation.
Gottfried
J
Jamie Morken
Lol I guess thats a compliment? Anyway I found a new pattern once I made the primes encoded binary sequence, the pattern became clearly visible:
formatting link
Thats all zeros and ones, depending on if a prime is at the positions given by the formulas:
y = 30x + 1 y = 30x + 7 y = 30x + 11 y = 30x + 13 y = 30x + 17 y = 30x + 19 y = 30x + 23 y = 30x + 29
The pattern can be seen if the zeros and ones are displayed as a bitmap, but only if there is the correct number of columns in the bitmap, and that is the pattern I found, the column count to show the pattern seems to be this for primorial30:
8*prime (where 8 is how many coprimes 30 has)
I tested prime 7 so far, but I think the pattern seen might hold for larger primes too.
When 8*7=56 columns are used ie here are the first 20 rows, all having columns of zeros:
The columns of zeros match up to give these patterns that can be verified:
30x+7 is always NOT prime every seventh x
30x+19 is always NOT prime every seventh x (offset one from x for 30x+7)
30x+17 is always NOT prime every seventh x (offset two from x for 30x+7) and continuing for other zero columns.
So I can increase the compression of this prime binary sequence further.
Here is a picture showing the pattern of zero columns that occur for
8*7 columns
formatting link
Here is a picture showing there are also zero columns (narrow white vertical lines) for 8*83, so it is probable that for any 8*prime, there are zero columns that show a further pattern of spacings that are not primes.
formatting link
I guess if you add up all these not prime rules you can get a formula for prime numbers :D
cheers, Jamie
J
Jamie Morken
Hi,
Here's some more data using primorial 210 instead of primorial 30 equations showing distribution of prime last digits:
There are too many permutations to show for all 210 equations that show the last digits of consecutive primes, but here are some highlight results of a subset of the 48 primorial210 equations:
y=210x+b where b = {1 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67
That is a huge discrepancy of consecutive last digits occurrences that can be explained with simple statistics, based on how far ahead in number gap the next prime is, ie the top occurring last digit grouping "97 to 101" occurred 581 times, and this is a 4 digit spacing, while the lower occurring last digit groupings, ie "181 to 31" at the bottom, only occurred 1 time. This is a (209-181)+31=59 number gap in the primes, so it makes sense that it occurred less often than the closer spaced primes.
The pairs like "17 to 17" didn't even show up once in the test I did since that is 210 digits apart for consecutive primes within a primorial210 block.
The same thing can be done for larger primorial equation sets, ie primorial 2310 with 480 equations and 480^2 permutation of the consecutive last digit pairings will show a huge discrepancy in the last digits (up to last 4 digits) of consecutive prime numbers.
Here is the C# code excerpt used to do this test:
foreach (int prime in Primes) { foreach (int i in new[] { 1, 11, 13, 17, 19, 23,