Mathematician pair find prime numbers aren't as random as thought

March 15, 2016 by Bob Yirka report
Prime Numbers

(Phys.org)—A pair of mathematicians with Stanford University has found that the distribution of the last digit of prime numbers are not as random as has been thought, which suggests prime's themselves are not. In their paper uploaded to the preprint server arXiv, Robert Lemke Oliver and Kannan Soundararajan describe their study of the last digit in prime numbers, how they found it to be less than random, and what they believe is a possible explanation for their findings.

Though the idea behind prime numbers is very simple, they still are not fully understood—they cannot be predicted, for example and finding each new one grows increasingly difficult. Also, they have, at least until now, been believed to be completely random. In this new effort, the researchers have found that the last digit of prime number does not repeat randomly. Primes can only end in the numbers 1, 3,7 or 9 (apart from 2 and 5 of course), thus if a given ends in a 1, there should be a 25 percent chance that the next one ends in a 1 as well—but, that is not the case the researchers found. In looking at all the prime numbers up to several trillion, they made some odd discoveries.

For the first several million, for example, prime numbers ending in 1 were followed by another prime ending in 1 just 18.5 percent of the time. Primes ending in a 3 or a 7 were followed by a 1, 30 percent of the time and primes ending in 9 were followed by a 1, 22 percent of the . These numbers show that the distribution of the final digit of prime numbers is clearly not random, which suggests that prime numbers are not actually random. On the other hand, they also found that the more distant prime numbers became the more random the distribution of their last digit became.

The researchers cannot say for sure why the last digit in prime numbers is not random, but they suspect it has do with how often pairs of primes, triples and even larger grouping of primes appear—as predicted by as the k-tuple conjecture, which frustratingly, has yet to be proven.

Explore further: The sum of digits of prime numbers is evenly distributed

More information: Unexpected biases in the distribution of consecutive primes, arXiv:1603.03720 [math.NT] arxiv.org/abs/1603.03720

Abstract
While the sequence of primes is very well distributed in the reduced residue classes (mod q), the distribution of pairs of consecutive primes among the permissible ϕ(q)2 pairs of reduced residue classes (mod q) is surprisingly erratic. This paper proposes a conjectural explanation for this phenomenon, based on the Hardy-Littlewood conjectures. The conjectures are then compared to numerical data, and the observed fit is very good.

Related Stories

The sum of digits of prime numbers is evenly distributed

May 12, 2010

(PhysOrg.com) -- On average, there are as many prime numbers for which the sum of decimal digits is even as prime numbers for which it is odd. This hypothesis, first made in 1968, has recently been proven by French researchers ...

New largest prime number found

January 20, 2016

(Phys.org)—A team at the University of Central Missouri, headed by Curtis Cooper has announced, via press release from the Mersenne organization, that they have found the largest prime number ever—it is 274,207,281 – ...

Recommended for you

Fossils of early tetrapods unearthed in Scotland

December 7, 2016

(Phys.org)—A team of researchers working at a dig site in Scotland has found tetrapod fossils dated to approximately 15 million years after the Devonian mass extinction—a time period experts in the field have referred ...

25 comments

Adjust slider to filter visible comments by rank

Display comments: newest first

julianpenrod
2.3 / 5 (6) Mar 15, 2016
Among other things, this may not be so significant for the theory of numbers overall. Supposedly 10 is only one of infinitely many bases that numbers can be expressed in. Note that, written in base 2, every prime number after 2 ends in 1.
julianpenrod
2.6 / 5 (5) Mar 15, 2016
A number of discoveries I have made about primes and trigonometric functions. I have tried submitting reports on these to various mathematics and "science" journals, but been ignored each time.
Among other things I found, if you construct the scattershot graph of sin(i), where i is an integer from 1 on up, the result looks like a chicken wire array of nested hexagons. sin(p(i)), where p(i) is the i'th prime, looks like overlapping sine waves, with repeated gaps where a sine wave should be.
Suspecting a connection between trigonometric functions, pi, the ratio of the circumference of a circle to is diameter, and p(i), the i'th prime number, I looked then at (p(i)/pi) – [p(i)/pi] and I found that the scattershot produces repeating parallel collections of straight lines, ten in a bunch, with a space big enough for another line separating the bunches. This pattern does not occur for any other irrational number, like e = 2.71828..., sqrt(10)=3.1622... .
JongDan
5 / 5 (5) Mar 15, 2016
Among other things, this may not be so significant for the theory of numbers overall. Supposedly 10 is only one of infinitely many bases that numbers can be expressed in. Note that, written in base 2, every prime number after 2 ends in 1.

I'd expect there could be a difference between prime-base and composite-base systems.
JongDan
5 / 5 (8) Mar 15, 2016
Among other things I found, if you construct the scattershot graph of sin(i), where i is an integer from 1 on up, the result looks like a chicken wire array of nested hexagons. sin(p(i)), where p(i) is the i'th prime, looks like overlapping sine waves, with repeated gaps where a sine wave should be.

I'm not sure if I understood what exactly you did... if you plot i on x-axis and sin(p(i)) on y-axis, you do indeed get two overlapped waves, but only up to 25th prime. After that, it just appears random. At least that's what I got plotting it in Mathematica.
JongDan
5 / 5 (8) Mar 15, 2016
plots for
1) first 150 sin(p(i))
http://i.imgur.com/UfYsWXJ.png
2) first 25 sin(p(i))
http://i.imgur.com/vMHhabp.png
3) sin(p(i)) for i between 126 and 150
http://i.imgur.com/J7X0vzx.png
vlisivka
not rated yet Mar 16, 2016
julianpenrod
1 / 5 (2) Mar 16, 2016
You get the more accurate image if you go to 1000 or more primes. It does appear unordered over the first numbers, but, when you look at the graph over 1000 or more primes, it does have a definite form.
It may not have any immediate place in proving the facts about primes and trigonometric functions, but, for any integer n > 2, the product of sin(n*pi/j), where j goes from 2 to n-1 is 0 if and only if n is composite.
Also, the sequence of values p(i+1)-p(i), the differences between successive primes, has a choppiness that resembles sin(i) or sin(i^2) or some such. In fact, summing the products of j^(1/pi) times some expression involving the sine function, where j goes from 1 to n, and multiplying the sum by an expression like n^a/(ln(n)^b) can tend to produce nearly constant values that seem to approach a limit.
JongDan
5 / 5 (4) Mar 16, 2016
for any integer n > 2, the product of sin(n*pi/j), where j goes from 2 to n-1 is 0 if and only if n is composite.

this one is simple; the product of sin(n*pi/j) is 0 if sin(n*pi/j) is 0 for at least one j. If n is prime, it isn't divisible by any j, and n/j isn't an integer. However, sin(n*pi/j) is 0 exactly when n/j is an integer. Meanwhile, a composite number is divisible by at least one j smaller than it, so sin(n*pi/j) is 0 for that j.
JongDan
5 / 5 (2) Mar 16, 2016
You get the more accurate image if you go to 1000 or more primes. It does appear unordered over the first numbers, but, when you look at the graph over 1000 or more primes, it does have a definite form.

I'm still not seeing it though. Could you plot it yourself and explain what I should be looking at?
JongDan
5 / 5 (3) Mar 16, 2016
You get the more accurate image if you go to 1000 or more primes. It does appear unordered over the first numbers, but, when you look at the graph over 1000 or more primes, it does have a definite form.

I'm still not seeing it though. Did it over first 10000, and looked at various sections of it separately too because it was a mess. Could you plot it yourself and explain what I should be looking at?
julianpenrod
1 / 5 (3) Mar 16, 2016
As for the product of sines, that's why I looked at that. That was not an accidental discovery.
If the physical scale of the vertical axis is made about the same as the horizontal, the appearance can be like that of overlapping sine curves.
LifeBasedLogic
Mar 18, 2016
This comment has been removed by a moderator.
julianpenrod
1 / 5 (4) Mar 18, 2016
Just because someone doesn't want to take a risk with a website that might be programmed to download more from your computer than you authorize, and especially since JongDan provided URL's for the other images but not the one they supposedly constructed with 1000 primes, does not mean someone is ignoring the request. The image for sin(p(i)) vs. iis at
http://imgur.com/wz3xXCc
If I find my computer has been compromised by this I will let you know.
A point. The correct formula from an earlier comment is a sum of j^(1/pi) times some simple expression involving sin(j), from j=1 to j=i. p(i) divided by this sum, multiplied by ln(i)^a/(i^(1/pi))^b will tend to approach some constant value.
Omega192
5 / 5 (2) Mar 18, 2016
Just because someone doesn't want to take a risk with a website that might be programmed to download more from your computer than you authorize...
...If I find my computer has been compromised by this I will let you know.


You're aware imgur is a widely used image hosting site, right? If they were "downloading more from your computer than you authorize" one of its millions of users would have noticed by now. I've yet to hear of any way to pull any file from your computer other than the one/s you select in the file picker.

That being said, thank you for providing exactly what you're trying to show. It looks interesting but it's also a sine function so it wouldn't be too surprising if it looks sinusoidal. I defer to those who are more knowledgeable of math to delve any meaning from that, though.
julianpenrod
1 / 5 (1) Mar 18, 2016
My system froze twice and failed to reboot twice, then declared a password was needed to get it out of a locked state after accessing imgur. The fact is, many people don't know how their computer works or whether, in fact, it is being misused. Why do you think so many end up being hacked?
As for the shape of the curve, as I said, sin(i), where i is an integer, looks like a chicken wire array of nested hexagons. That is not consistent with a sinusoidal curve. It's more than that the sine is involved that produces the sinusoidal appearance of sin(p(i)).
Captain Stumpy
3.7 / 5 (3) Mar 18, 2016
My system froze twice and failed to reboot twice, then declared a password was needed to get it out of a locked state after accessing imgur
@juli
this is far more likely of a problem on your PC than because of imgur, especially due to advertising and other hackable secondary pop-up's and stuff which most people ignore
most Antivirus (AV) software will also track threats... http://www.mcafee...mgur.com

there aren't many viruses that are transmitted via graphics, and any decent AV will be able to protect you

there are free versions of AV you can DL you may want to consider

but again, the problem you had is far more likely to have come from other sites (including PO) than from imgur

(you can also alleviate ads & etc with either ad-block and or a HOST file - i suggest researching a little for what would be best for you and what your AV will best integrate with)
damien_scholes1
not rated yet Mar 19, 2016
This mentioned was the fact that 1 followed by 1 had only a 18% chance of occurrence whereas a 1 followed by a 3 is a 30% chance.
This is obvious when you look at how the prime numbers are formed as all primes greater than 3 can be written as (6n-1) and (6n+1) this means that once a prime number has been discovered say of the form (6n-1) then the next number that would be checked is of the form (6n+1), hence 2 apart. If the prime number was of the form (6n+1) then the next number checked would be of the form (6n-1) hence 4 apart.
This is due to the order of the primes being generated and nothing else.
damien_scholes1
not rated yet Mar 19, 2016
Just to clarify and add to this further the end numbers that should occur more frequently as consecutive numbers are: 1 - 3, 3 - 7, 7 - 9, 7 - 1, 9 - 1, 9 -3.
If the probability of the primes are random then the next possible prime from a digit unit of 1 using the form 6n + 1 or 6n - 1 with a gap of 4 and 2 respectively has a chance of 25% (estimate). For 6n + 1 your next option 6n - 1 would end in 5 hence 100% chance of p'. So lets think about stopping when we hit a prime here are the options
For 1 start at:
6n + 1
p = 0% (end in 5)
p' p = 25% (end in 7)
p' p' p = 19% (end in 1)
p'p'p'p = 11% (end in 3)
p'p'p'p'p = 8% (end in 7)
p'p'p'p'p'p = 6% (end in 9)
p'p'p'p'p'p'p= 4% (end in 3)
p'p'p'p'p'p'p'p= 0% (end in 5)
p'p'p'p'p'p'p'p'p= 3% (end in 9)
p'p'p'p'p'p'p'p'p'p=2.5% (end in 1)
damien_scholes1
not rated yet Mar 19, 2016
For 1 start at:
6n - 1
p = 25% (end in 3)
p'p = 19% (end in 7)
p'p'p = 11% (end in 9)
p'p'p'p = 8% (end in 3)
p'p'p'p'p = 0% (end in 5)
p'p'p'p'p'p = 6% (end in 9)
p'p'p'p'p'p'p = 4% (end in 1)
p'p'p'p'p'p'p'p = 0% (end in 5)
p'p'p'p'p'p'p'p'p=3% (end in 7)
p'p'p'p'p'p'p'p'p'p = 2.5% (end in 1)
these would continue to loop and clearly show that consecutive primes will favour numbers 2 or 4 apart than any other increment. This is logical.
damien_scholes1
not rated yet Mar 19, 2016
Using excel I have analysed 99.9% of the probability data this has revealed that starting at 1 the consecutive probabilities are
1 - 17.4% 3 - 30.9% 7 - 32.6% 9 - 19.1%
Which conclude that their findings just show that these prime digits are random after all. Not really difficult Maths I might do a short tutorial to explain my findings and this disproof of the statements made in this article.
compose
Mar 19, 2016
This comment has been removed by a moderator.
damien_scholes1
1 / 5 (1) Mar 19, 2016
My research using basic probability disproves the part that says that two consecutive primes ending in 1 have a 25% chance of occurring. This is because you are testing whether the next number of the form 6n + 1 or 6n - 1 is prime. Even if I used Riemanns number system instead of 25% this would not make any difference because it is proportional. If anyone needs to check my excel document for proof you can do altering the 25% would show the same outcome.
ParaFunkt
1 / 5 (2) Mar 19, 2016
If you consider the universe as a mathematical structure, prime numbers are a common if not universal language in nature. It would make sense to use prime numbers to make it less likely to conflict with another. They give the illusion of randomness because we perceive most things as divisible. Do spiral galaxies complete a full rotation as a prime?
ParaFunkt
1 / 5 (2) Mar 19, 2016
Further more I find this article to completely absurd and think it was randomly chosen without peer review....
damien_scholes1
1 / 5 (1) Mar 23, 2016
Just as a correction to my own comment;
Below 10,000,000,000,000 there are 346,065,536,839 primes as all primes above 5 end in 1, 3, 7 and 9. This means that out of the total of numbers 4 in every 10 can have a chance of being prime. Hence we have 346,065,536,839 out of 4,000,000,000,000 giving 8.65% chance of a number ending with 1, 3, 7 and 9 being prime. If we analyse the probability of these using the above method this will give 1 followed by 1 – 22.0%, 1 – 3 – 27.4%, 1 – 7 27.3%, 1 – 9 23.4%
This is still nowhere near 25% for 1 and is within the range analysed.

Please sign in to add a comment. Registration is free, and takes less than a minute. Read more

Click here to reset your password.
Sign in to get notified via email when new comments are made.