The story behind my favourite prime number
Published on Thursday, 14. May 2020Most people are weirded out when I tell them about my favourite prime number. They simply don't have one. Those who do usually mention one with a single digit and are unable to name one with more than two digits.
My favourite prime number is 150067.
It's perfectly fine if you don't have a favourite prime number. In fact, it's the normal thing to not have one.
Prime numbers are nothing so special, that you should care about them.
A mathematician might disagree with that statement, but mathematicians are a strange folk.
I, on the other hand, intrinsically like numbers. Well, some of them. Others I'm indifferent to. 5, for example. What a bore! As long as I can remember, I associate numbers with emotions. I don't know where this comes from. But this prime is the only number with a story to explain why I am so fond of it.
This story goes back to when I was in 9th or 10th grade. At that time, we read the book "The Curious Incident of the Dog in the Night-Time" in English class.
Apart from a rough outline (which is more than for most books I had to read in school) I only remember one chapter. It was about prime numbers.
In this chapter, the narrator explains that a certain three-letter agency pays a certain amount of money if you discover a prime number previously unknown to them.
I don't remember the specifics and they don't matter. But I was so bored by the class, that this chapter spawned the idea to write a program on my calculator to check if a number is prime.
Remembering this now, the program is nothing special. You can recreate what I wrote with four lines of python code. But back then, I didn't have much experience with programming. It was the first time I solved this problem, and it took me some time to understand the unfamiliar programming language and interface of the calculator.
Writing this program took me longer than that one class. But I distinctly remember the joy I felt writing it. And even after finishing it and when I was really bored, I used to check for arbitrary numbers if they were prime.
You already know the first multi-digit prime I found with this program.
def check_prime(n): for i in range(2, int(math.sqrt(n))+1): if n % i == 0: return False return n > 1