[note: as I count a few more of the last digit triples, the results are updated on this google-doc spreadsheet:

https://docs.google.com/spreadsheets/d/1fZ0wkYrei3CR1XtUuqWKVubAbuM0EzFZ-SGOkKnapd0/edit#gid=0

As of the morning of March 25th I’m up to the first 6 billion primes]

I found the latest news about patterns in last digits of consecutive primes to be really interesting. Here’s Evelyn Lamb’s piece about the new paper:

Peculiar Pattern Found in “Random” Prime Numbers

Although the main results in the paper are way over my head, I thought it would be fun to try to understand the results a bit more. I decided to look at the last digits (in base 10) of triples of consecutive primes. Mathematica makes this task pretty simple since there is a function Prime[i] which tells you the prime number.

So, I meant to study the patterns in the fist 10 billion primes, but when that program finished running I accidentally deleted the data – oops. Now I’m running 1 billion at a time. The results so far are in the table below. The first column is the pattern of 3 digits, the second column is how many times that pattern occurs in the first 100 million primes, the 3rd column is how often that pattern appears in the first billion primes, and the last column is how often it appears in the 2nd billion primes. The clustering in the patterns is strange. For example, why are the numbers for the patter (3,7,7) so similar to the ones for (3,3,7)? I’ll update this as more results pop out of the computer.

First First 1,000,000,000 to

100,000,000 1,000,000,000 2,000,000,000

(7,7,7) 735,435 8,006,387 8,351,773

(3,3,3) 737,172 8,013,553 8,356,530

(9,9,9) 752,906 8,139,168 8,471,313

(1,1,1) 752,991 8,143,311 8,472,066

(1,9,9) 1,057,410 10,978,711 11,198,641

(1,1,9) 1,057,849 10,981,805 11,199,329

(7,7,1) 1,089,299 11,397,105 11,659,414

(9,3,3) 1,090,380 11,398,336 11,661,478

(9,7,7) 1,120,365 11,634,379 11,854,429

(3,3,1) 1,121,750 11,639,504 11,854,065

(9,9,3) 1,123,151 11,654,003 11,880,474

(7,1,1) 1,123,346 11,652,871 11,877,020

(3,1,1) 1,152,478 11,848,595 12,031,756

(9,9,7) 1,153,949 11,854,029 12,028,070

(7,3,3) 1,190,879 12,315,608 12,517,157

(7,7,3) 1,191,047 12,310,589 12,518,011

(3,7,7) 1,253,361 12,896,307 13,090,240

(3,3,7) 1,253,949 12,898,170 13,087,114

(1,9,7) 1,304,421 13,561,347 13,799,747

(3,1,9) 1,305,280 13,556,507 13,800,610

(3,3,9) 1,329,690 13,563,836 13,703,504

(1,7,7) 1,330,194 13,565,657 13,699,576

(3,9,9) 1,337,398 13,624,284 13,756,109

(1,1,7) 1,338,238 13,626,051 13,752,462

(7,7,9) 1,423,574 14,388,649 14,466,820

(1,3,3) 1,424,130 14,387,566 14,466,048

(1,1,3) 1,473,963 14,743,098 14,762,437

(1,9,3) 1,474,440 14,895,602 14,973,534

(7,1,9) 1,475,115 14,902,832 14,973,667

(7,9,9) 1,475,202 14,749,205 14,762,144

(9,9,1) 1,592,910 15,844,168 15,808,349

(9,1,1) 1,594,226 15,849,488 15,805,452

(9,1,9) 1,604,100 16,251,163 16,325,968

(1,3,1) 1,605,399 16,249,250 16,330,014

(1,9,1) 1,606,073 16,256,647 16,327,652

(9,7,9) 1,606,645 16,251,438 16,329,446

(9,3,1) 1,623,274 16,186,003 16,171,463

(9,7,1) 1,624,894 16,197,827 16,178,227

(3,1,3) 1,637,164 16,478,634 16,516,505

(7,9,7) 1,638,318 16,483,693 16,519,549

(7,3,1) 1,660,559 16,560,034 16,531,550

(9,7,3) 1,660,835 16,560,577 16,533,455

(3,7,3) 1,817,402 17,915,772 17,771,206

(7,3,7) 1,818,700 17,918,059 17,766,848

(3,9,3) 1,819,555 17,915,593 17,758,829

(7,1,7) 1,821,161 17,911,268 17,768,419

(9,3,9) 1,827,515 17,942,425 17,766,508

(1,7,1) 1,829,358 17,936,238 17,769,169

(3,7,1) 1,830,430 18,059,352 17,921,956

(9,3,7) 1,831,771 18,057,340 17,926,542

(3,9,7) 1,916,051 18,745,152 18,548,191

(3,1,7) 1,916,059 18,751,055 18,538,221

(7,1,3) 1,954,359 19,123,551 18,909,660

(7,9,3) 1,955,794 19,118,907 18,913,154

(7,3,9) 2,085,057 20,272,160 19,973,655

(1,7,3) 2,085,911 20,278,923 19,966,538

(1,3,7) 2,139,275 20,808,168 20,500,739

(3,7,9) 2,142,502 20,810,306 20,497,841

(1,7,9) 2,259,149 21,792,998 21,392,025

(1,3,9) 2,260,634 21,792,207 21,386,368

(7,9,1) 2,362,556 22,891,586 22,491,285

(9,1,3) 2,363,951 22,891,907 22,494,566

(9,1,7) 2,429,154 23,285,442 22,768,206

(3,9,1) 2,429,892 23,285,599 22,766,906

One thing I’m a little confused by (or curious about) is that I would’ve expected the ‘thinning out’ of primes along the way to cause the LAST column to usually be lower than the 3rd column, yet it looks like in OVER HALF the cases the final column is MORE than the 3rd column. Am I missing something obvious? And are you on the way to doing a 5th column etc.?

The columns each should add up to 1,000,000,000 because I’m looking at the first billion primes (and 2nd and 3rd . . . ) rather than primes up to 1,000,000,000, and between 1,000,000,000 and 2,000,000,000.

*I think* (though, again, the theory is way over my head) that the k-tuple conjecture says eventually all 64 triples should have the same number of occurrences. That would mean every number in a column would be about 1 billion / 64, or 15.6 million.

Thanks, of course! (I was misreading column as from a billion integers instead of billion primes only)… now that makes the “clustering” as you say, even more interesting. This could be an entire weekend project! ğŸ˜‰

How about the base 4 instead of base 10 version? That’s a lot less to stare at.

I would suspect that just as the biases on 2-tuples are way higher than on 1-tuples (i.e. it takes a lot longer for the tuple classes to even out), the biases on your 3-tuples should be yet way higher, so it should take absurdly long.

I’m sorry the numbers don’t format so well on the blog – I’ll probably transfer them to a google doc later today.

I’d like to look at the base 10 triples for the first 10 billion primes. Mostly because I already did and then accidentally deleted the results – whoops!

Base 3 and Base 4 would definitely be interesting, too. Maybe that’ll be the next project.

I’m now updating the results on this google-doc so that they are easier to read:

https://docs.google.com/spreadsheets/d/1fZ0wkYrei3CR1XtUuqWKVubAbuM0EzFZ-SGOkKnapd0/edit#gid=0

How many more columns you got by now? Is the same pattern (clustering or coupling) happening? really does seem bizarre… since each billion set is more-or-less independent of every prior one (right?) seems odd that ANY pattern would re-occur for the very same triplets — hearing at all from number theorists on it? Are we on the path to Lawler’s Conjecture? ğŸ˜‰

The spreadsheet is here – the pattern seems to be that (a,b,c) mod 10 appears nearly exactly the same amount of times as (-c,-b,-a) mod 10. I have no idea why, though I’m sure that someone who understands number theory could explain it:

https://docs.google.com/spreadsheets/d/1fZ0wkYrei3CR1XtUuqWKVubAbuM0EzFZ-SGOkKnapd0/edit?usp=sharing