Created by Wadham mathematician Levi Borodenko (M. Mathematics and Statistics, 2016), a whizz with data manipulation, the image was generated by an open source computer programme which Levi has built.
Levi explains how the programme came about. “The idea came while I was a counsellor at PROMYS – the Wadham hosted mathematics immersion summer camp. We had a ‘Secret Santa’ and, being a poor student, I tried to come up with a gift idea that would light a maths major’s heart without being pricey. So I decided to find a prime that looked like the face of the person that I had to gift. I coded up a quick and dirty script (back then I was using python to find the number and then mathematica to find the next prime). After doing this for a few years I decided that more people should be able to enjoy generating these primes. This is when I coded up the open-source tool.”
Explaining the maths behind the programme Levi explains: “The first step in finding the Dorothy prime is simply to design a number (which most likely won't be prime) that looks like Dorothy. This is achieved by converting the image into black and white with at most 10 grey scale levels. Then we assign a digit to each grey scale level. A bright grey gets a number that uses little ink like 1 or 7 and a dark grey gets a number that needs lots of ink like 8. This way we convert the image into a grid of digits that resemble the image. Reading the grid from left to right and top to bottom, we obtain our non-prime Dorothy number.”
“We utilise some maths to then find the actual Dorothy prime. There is a very important theorem called ‘The Prime Number Theorem’. In simple terms it states that if we have a number with N digits, then we expect to find a prime roughly within the next N following numbers. Which for our 7500 digit Dorothy number simply means that by tweaking the last 4 digits we will most likely be able to make the whole number prime. After checking a few thousand last-4-digit combinations we thus obtained the desired Dorothy prime.”
This being a tedious process, Levi decided to write ‘Primify’ an open source computer program that does all the above in a fully automatic way.
And if you think Dorothy has a large prime number, think again. Levi comments: “As of January 2020 the largest prime is 2^82,589,933 - 1 and has 24.9 million digits. Unfortunately it probably does not look like Dorothy.”