The Corpus Christi Prime
Written by Mike James   
Saturday, 30 September 2017

This is a clever idea that seems obvious only after you have seen it. Are there other applications waiting to be thought up?

Jack Hodkinson is a math student at Cambridge and he decided to find a prime that when expressed in binary in a grid produced a picture that looked like Corpus Christi College. There is nothing special about the particular image chosen you could go in search of a prime that produced an image of a celebrity or your cat. 

So how do you do it?

At first it seems impossible. There may well be provably infinite primes but finding one that looks like Corpus Christi seems to be an unlikely quest. However, this is overlooking some interesting ideas abouit how many primes there are in a given interval. 

The procedure adopted was to first create an image of the building, then digitize it and display it as an array digits. Then take the digits and  read them as single large number. In this case the result had 2688 digits - that's a big number. The final step is to generate some random deviations from the number and test these for primality. As long as the random changes are small, any prime that you find will look like the original image with some undetectable random changes. 

To speed things up the random set was tested using the Miller-Rabin primality test, which allows you to conclude that a number is prime with a high degree of probability. Usually the Miller-Rabin test is good enough, after being applied a few times, to be as certain as makes no difference that a number is a prime, but in this case it seems we need the ultimate proof. To test absolutely that the eight candidates were prime or not, a fast factorization algorithm was used. All eight candidates had no factors and so they were all prime.

This means that rather than looking for a needle in a haystack there are eight primes that all look quite close to a picture of Corpus Christi. The oversupply problem was solved by selecting the best looking:

 

corpus

 

So what appeared to be difficult was in fact much easier than you would have guessed - unless of course you had already worked out that there are aproximately 1.6 x 102683 primes with 2688 digits. Putting this another way, one in 6200 2688 digit numbers are primes and as we only need consider odd numbers that is more like one in 3100 candidate numbers is prime. 

If you work with a large enough number of digits you are likely to find a prime that is fairly close to any reasonable bit pattern you pick. This means that you aren't restricted to the Corpus Christi prime. You could find the Homer Simpson prime or your selfie as a prime. 

Is there any value in this?

Apart from fun probably not, but look out for the first web service that delivers you a picture prime of your choosing. 

More Information

The Corpus Christi Prime

Related Articles

Prime Numbers And Primality Testing

48th Mersenne Prime Discovered

Reaching The Unreachable - Pi Squared And Catalan's Constant

A Quantum Computer Finds Factors

Solve The Riemann Hypothesis With A Quantum Computer

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Microsoft Introduces Vector Abstractions Library For .NET
21/11/2024

Microsoft has announced a preview release of the Microsoft Extensions VectorData Abstractions library, which can be used to help integrate vector stores into .NET applications and libraries.



Apache Releases Tomcat 11
07/11/2024

Apache has announced the release of Tomcat 11, as well as marking the 25th anniversary of the first commit to the Apache Tomcat source code repository since becoming an ASF project.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

 

 

Last Updated ( Sunday, 01 October 2017 )