Following on from the series of ‘Pascal’s Triangle and its Secrets‘ posts, guest author David Benjamin shares another delightful piece of mathematics – this time relating to prime numbers.
At the time of writing the largest known prime number has
Patrick Laroche from Ocala, Florida discovered this Mersenne prime on December 7, 2018. I was surprised to discover that it’s exponent
The Greek mathematician Euclid of Alexandria (
Mersenne primes, named after the French monk Marin Mersenne, are of the form
Since generally testing numbers for primality is slow, some have tried to find methods to produce primes using a formula. Euler’s quadratic polynomial
The French mathematician Lejeune Dirichlet proved that the linear polynomial
14 fruitful fractions
The primes are unpredictable, and become less common as they get larger. Consequently there is no formula that will generate all the prime numbers. However, there is a finite sequence of fractions, that – given an infinite amount of time – would generate all the primes, and in sequential order.
They are the fruitful fractions, created by the brilliant Liverpool-born mathematician, John Horton Conway (1937–2020) who, until his untimely death from complications related to COVID-19, was the John von Neumann Emeritus Professor in Applied and Computational Mathematics at Princeton University, New Jersey, USA.
The fruitful fractions are
A | B | C | D | E | F | G | H | I | J | K | L | M | N |
The first time I encountered this set of fractions was in the wonderful book, The Book of Numbers, by Conway and Guy. I was so intrigued as to how Conway came up with his idea, I emailed him to ask. I was delighted to receive an outline of an explanation and even a second set of fractions, neither of which I can now find – it was 1996 and pre-cloud storage! But no worries… Conway explains everything in this lecture, which also demonstrates his passion for mathematics and his ability to express his ideas in a relaxed and humorous way, even when he searches for an error in his proof on 26 minutes. The lecture also includes an introduction to Conway’s computer language, FRACTRAN, which includes the statement:
‘It should now be obvious to you that you can write a one line fraction program that does almost anything, or one and a half lines if you want to be precise‘.
Using the fractions to find prime numbers
Here’s how the fractions are used to generate primes.
- Start with the number
- Multiply by each of the fourteen fractions until you find one for which the product is an integer
- Starting with this new integer, continue multiplying through the fractions until another integer is produced. (If this process reaches fraction
, the integer’s product with N is guaranteed to be another integer as N has a denominator of ; the process continues with this new integer being multiplied by fraction A) - Continue multiplying through the set to create more integers
- When the integer is a power of
, its exponent will be a prime number.
The 19 steps needed to produce the first prime number are:
The number of steps needed to produce the first 7 primes are shown in the table below:
Prime | 2 | 3 | 5 | 7 | 11 | 13 | 17 |
Steps | 19 | 69 | 281 | 710 | 2375 | 3893 | 8102 |
And here is the start and end of the sequence of fractions used to produce the next prime number from
The steps needed for the first 34 primes are given as OEIS A007547 and the first 8102 products in the B-list for A007542.
The successive primes are produced almost like magic – but the number of multiplications needed to produce each new prime becomes larger and larger, and so the method, though wonderfully inventive, is not at all efficient.
Edit: Since this article was first published, the exponent
Further Reading on John Conway
- Listen to this Numberphile interview with Conway on how he invented the Game of Life
- Play the Game of Life
- Aperiodical posts about John Conway
- Conway’s publications on Scholia
- Conway and knots: ‘I proved this when I was at high school in England’
- Graduate Student Solves Decades-Old Conway Knot Problem, in Quanta
Love this, David. Big fan of prime numbers and of Conway too. So sad to hear of his death. Difficult not smile when you heard him speak.
It always amazed that whist it is easy prove there are an infinite number of primes, it equally easy to prove that there can be an I finite gap between successive primes too!
The indices of Mersenne primes, excluding the index 2, which produce primitive Pythagorean triples are the sequence of primes that are not Gaussian primes: https://oeis.org/A112634. Gaussian primes: https://mathworld.wolfram.com/GaussianPrime.html
The more I think of how this set of factions is being used the more astonishing it seems…
Thanks for including the link to the lecture – fascinating!
An update on Conway’s game of life – The famous cellular automaton has been found to have periodic patterns of every possible length.
https://www.quantamagazine.org/maths-game-of-life-reveals-long-sought-repeating-patterns-20240118/
An update, as a visual display, on the astonishing length of the latest largest prime number https://www.youtube.com/watch?v=zsyGRDrDfbI