March 15, 2016 report

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

*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 prime number 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 time. 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

**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.

© 2016 Phys.org

**Citation**: Mathematician pair find prime numbers aren't as random as thought (2016, March 15) retrieved 20 April 2019 from https://phys.org/news/2016-03-mathematician-pair-prime-random-thought.html

## User comments

julianpenrodjulianpenrodAmong 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... .

JongDanI'd expect there could be a difference between prime-base and composite-base systems.

JongDanI'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.

JongDan1) 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

vlisivkajulianpenrodIt 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.

JongDanthis 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.

JongDanI'm still not seeing it though. Could you plot it yourself and explain what I should be looking at?

JongDanI'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?

julianpenrodIf 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.

LifeBasedLogicjulianpenrodhttp://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.

Omega192You'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.

julianpenrodAs 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 Stumpythis 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_scholes1This 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_scholes1If 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_scholes16n - 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_scholes11 - 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.

composedamien_scholes1ParaFunktParaFunktdamien_scholes1Below 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