Prime triples and the Sieve of Eratosthenes

For the last week I’ve been looking at the last digits of triples of consecutive prime numbers. This exercise was inspired by the new paper of by Robert J. Lemke Oliver and Kannan Soundararajan of Stanford who just made some surprising discoveries about last digits of pairs of consecutive primes. I wrote about my week-long project here:

My fun interaction with prime numbers this week

One of the strange patterns that I noticed was that each of the 64 last digit triples seems to have a partner that occurs with the same frequency. I did not know why this paring was happening and wrote to Lemke Oliver and Soundararajan to see if there was an explanation that I could understand.

They wrote back (yay!) and told me that the pairing related to something that occurs in the Sieve of Eratosthenes. The idea goes something like this:

(1) The pairing I was seeing was that the last digit triple (A,B,C) occurs with about the same frequency as the triple (-C,-B,-A). All of these last digits are being represented mod 10, so 3 = -7, 1 = -9, 7 = -3, and 9 = -1.

(2) Lemke Oliver and Soundararajan told me that you can see a similar groping in the Sieve of Erathosthenes at every step. So, if you stop after crossing out all the multiples of 2, 3, and 5 you’ll see the same number of consecutive last digits of the form, say,(7,1,3) as you’ll see of the form (7,9,3).

The reason has to do with properties of modular arithmetic – I think. I have to confess that I didn’t understand the full explanation (even though it only took 1 paragraph!), but it did seem like a fun idea to try to explore.

So, this morning I decided to explore the idea a little bit with my kids. I started by explaining the ideas about last digits of consecutive primes that caught my eye last week.

Then we worked out the first three steps of the Sieve of Eratosthenes and I asked the kids to talk about some of the patterns they saw:


Next we looked at some of the last digits in consecutive numbers which remained on the board. I also explained the (A,B,C) and (-C,-B,-A) pattern which led to a brief diversion into what -X means in mod 10.

Another fun question for kids in this part was – how many different triples of last digits of prime numbers are there?


The last thing we did was look to see if there were any (A,B,C) and (-C,-B,-A) pairs on the board. The e-mail from Lemke Oliver and Soundararajan said that there would be the same number of pairs in the numbers. Of course we only had the integers up to 60 on the board so I had no idea if we’d see any pairs. Turns out that we did – exciting!

It is fun to be able to find new math reserach that you can (partially) explain to kids 🙂


So, a fun little impromptu project for today. Sorry this one was a little rushed – the kids were heading out to go hiking in NH and I wanted to get in a short project before they left.

One thought on “Prime triples and the Sieve of Eratosthenes

  1. What still is not clear to me: you’re working with overlapping triples, so of course it will be possible to find such mod 10 pairings; indeed one could compute the probability of such pairings if one had a random string of any 4 (modular) numbers taken 3 at a time. I don’t quite grasp the ‘mechanism’ though by which the Sieve forces the skewed numbers of pairings [why SO MANY more (9,1,7)/(3,9,1) than say (1,9,3)/(7,1,9)]? I s’pose this gets back to the authors’ original finding… they’ve found a (repelling) last-digit effect; the question is ‘why’ is it there at all or what organizing principle of the primes does it expose? Will it all get tied back into Riemann’s zeta function somehow? Very tantalizing… and waaay beyond my reach.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s