You're reading: Blackboard Bold

Prime Time

We spotted this photograph of a letter to The Telegraph, shared by Card Colm on Twitter earlier in the year. It’s exactly the kind of mathematical claim we like to enjoy verifying, so we thought we’d dig in.

SIR – As one obsessed with prime numbers, I note that we have gone from 2017 (a prime) into 2018 (two times a prime), which will be followed by 2019 (three times a prime). I believe this sequence has only happened three other times in the past 1,129 years.
Keith Burgess-Clements
Maidstone, Kent

It’s lovely that newspapers will print this kind of letter, and a quick check verifies that Mr Burgess-Clements is indeed correct that these three numbers have the properties described:

  • $2017$ prime, $2018 = 2 \times 1009$, $2019 = 3 \times 673$

His follow-up statement, that this sequence has only happened three other times in the last 1,129 years, takes a little more checking. But only a little – as we have a resident CL-P, who describes the necessary calculation as ‘a trivial amount of Python code’, and quickly came up with the following list:

  • $13$ prime, $14 = 2 \times 7$, $15 = 3 \times 5$
  • $37$ prime, $38 = 2 \times 19$, $39 = 3 \times 13$
  • $157$ prime, $158 = 2 \times 79$, $159 = 3 \times 53$
  • $541$ prime, $542 = 2 \times 271$, $543 = 3 \times 181$
  • $877$ prime, $878 = 2 \times 439$, $879 = 3 \times 293$
  • $1201$ prime, $1202 = 2 \times 601$, $1203 = 3 \times 401$
  • $1381$ prime, $1382 = 2 \times 691$, $1383 = 3 \times 461$
  • $1621$ prime, $1622 = 2 \times 811$, $1623 = 3 \times 541$

Here’s that Python code, in case you’re curious. It uses Sage’s Primes() function.

pr = set([p for p in range(2018) if p in Primes()])
double = set(2*p-1 for p in pr)
triple = set(3*p-2 for p in pr)
years = sorted(pr & double & triple)

This is a full list of all the cases below 2017, and hints at some nice more interesting patterns – $13$ and $541$ both occur as the prime year and the prime factor that's a third of another year. But we don't have time to dig into that now – we have to check if a person in the newspaper was wrong!

Keith's claim that this has happened thrice in the last 1,129 years is indeed correct – $2018 – 1129 = 889$, and three sets of years have occurred since then. I suspect this may have been a typo though, as if he'd said "the last 1,139 years", that would have included the tail end of the set starting in $877$. Maybe he was looking for the most impressive length of time with the fewest occurrences, to illustrate how rare it is (in which case 1139 would be your best bet, and probably what he meant). We favour "only four times since 1000AD" which still sounds pretty good.

One final question to answer is, how many of these will there be going forward? The next few will be:

  • $2557$ prime, $2558 = 2 \times 1279$, $2559 = 3 \times 853$
  • $2857$ prime, $2858 = 2 \times 1429$, $2859 = 3 \times 953$
  • $3061$ prime, $3062 = 2 \times 1531$, $3063 = 3 \times 1021$

It's also worth checking when this pattern will continue for four years, so that the fourth year is four times a prime; that's $12721$, which is prime, while $12722 = 2 \times 6361$, $12723 = 3 \times 4241$ and $12724 = 4 \times 3181$.

What's your favourite number fact about 2018 so far? Answers in the comments.

6 Responses to “Prime Time”

  1. Avatar John

    If we write dates as 8 digit numbers yyyymmdd, then 2018 has 18 prime dates. 2019 will have 19 prime dates, and 2021 will have 21.

    Reply
  2. Avatar Rafa

    Just a Haskell version of the code:

    import Data.List
    import Math.NumberTheory.Primes.Sieve -- arithmoi library 
    import qualified Data.Set as Set
    
    years =  Set.intersection (Set.fromList pr) (Set.intersection doubles triples)
               where
                  pr = takeWhile (< 2018) primes
                  doubles = Set.fromList [2*p-1|p<-pr]
                  triples = Set.fromList [3*p-2|p<-pr]
    
    main = print years
    
    Reply
  3. Avatar Phil Ramsden

    Wolfram language, anyone?

    Select[Range[2017], AllTrue[{#, (# + 1)/2, (# + 2)/3}, PrimeQ] &]

    Reply

(will not be published)

$\LaTeX$: You can use LaTeX in your comments. e.g. $ e^{\pi i} $ for inline maths; \[ e^{\pi i} \] for display-mode (on its own line) maths.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>