Coding, Murderous Maths, Python, Simon teaching, Simon's Own Code, Simon's sketch book

Prime Generation Algorithm in Python

Simon has written a code in Python that generates primes using the finite list from Euclid’s proof that there are infinitely many primes. “Starting with one prime (2) the code uses the finite list to generate a couple more numbers that aren’t in the list but are primes. It may not even get to all the primes in the long run!” There is only one problem with Simon’s algorithm…

Simon has written down Euclid’s proof in his own words first
and then decided to program it in Python.


Murderous Maths, Notes on everyday life, Simon's sketch book

Fundamental Theorem of Arithmetic

Simon’s attempt to come up with his own proof

Simon working on his proof of the Fundamental Theorem of Arithmetic (he got stuck and then searched for existing proofs online).

The proof that he put together with the help of some resources online
Crafty, Murderous Maths, Simon teaching

Trinity Hall Prime Number

Simon saw this pattern in a Numberphile video featuring Tadashi Tokieda and recreated it in Excel, adding colours. There are 30 columns and 45 rows of digits in this picture, which means it is made of 1350 digits – the year that Trinity Hall (in Cambridge) was founded. the bottom is all zeros, apart from a few glitches. The glitches were necessary because the whole thing (reading from right to left, top to bottom) is also one number and it is a prime number!

Trinity Hall Pime Number 4 Jul 2018

Murderous Maths, Notes on everyday life, Simon's sketch book

Some more pictures of Simon’s everyday notes

Simon often drags his sketchbook to bed to “show me the beauty”, just before I would read a bedtime story to him and his sis. Last time he showed me a short proof of why there’re infinitely many primes. He assumed there were finitely many primes first… I think he learned that from James Grime:


Pi from Prime numbers:


Powers of 2:



Milestones, Murderous Maths, Notes on everyday life, Simon teaching

For the love of math

Simon saw an interesting example on Numberphile and came up with a more general formula for a case when a number can never be prime. Later someone noticed in the comments that Simon made a slight mistake and a should not equal 1. The correct formula is thus 1 < a <= n


Simon continues to be fascinated by math, and specifically – sequences and primes. This blog simply can’t keep up with all the math notes he produces on a daily basis and I will only be posting the most interesting picks from now on. I am filing all of his writings according to date in a separate folder and taking pictures, so nothing gets lost. Even when tucked in bed with me lying next to him reading a bedtime story he sits up again to grab his notepad and pencil to illustrate yet another special number, function or sequence and to share those with me. Last night he begged I let him write down just one more thing because he “really wanted to see the beauty of it” and ended up sketching a whole grid of numbers with primes forming nice diagonal lines across the page. I am deeply touched and honoured to be his first audience.

Milestones, Murderous Maths

Numbers as products of primes (a useful calculation practice). And the general beauty of primes.

Simon spent hours calculating – something he’s not particularly fond of if it were simple/ pointless sums, the way schoolkids work. His was not pointless!  He did it with the solemn purpose of expressing natural numbers as products of primes, the atoms of all numbers.



Here a spiral grid where primes form patterns that Simon finds really beautiful, too bad the A4 paper was too small to go on:


And a sequence in which every number is a sum of cubes (more calculations!):