Danny Willems -- Work In Progress

A mathematician fighting for privacy and security on the Internet, while dreaming about describing the Universe with equations and symbols.

Research Publications Public Talks Open source software contributions CV Education Blog PGP public key Recommended softwares Contact Proton calendar for cryptography and cybersecurity events
8 June 2024

Facts about prime numbers

by Danny Willems

I’ve always loved prime numbers. I don’t remember since when, but as far as I remember, including my kid’s life, I have always mentioned prime numbers as magic numbers. I remember being excited in front of this episode (or YT of Doctor Who, 42, where they mentioned happy prime numbers.

Since the boom of verifiable computation, prime numbers became a significant rock stars.

I’m keeping a list here of facts I love mentioning about prime numbers. It will be mostly used to compile ideas of interesting projects to build with.

I also love translating things into prime numbers to solve problems using basic algebra. For instance, take a list of strings (can be generalized to a list of symbols). And take the usual following problem: given two strings s1 and s2, are they sharing some letters? Assign a prime numbers to each letter of the alphabet, and translate the strings into their products of the primes. If the two strings share some characters, their greatest common divisor will be different than one.

From there, you can have: if s1 has all its letters in s2, then p(s1) divides p(s2). This problem on strings can be optimised using assembly instructions directly and only a few number of registers. Use Mersenne primes to optimise the computation of the function p when there are not that many characters (see the list of Mersenne primes)

Some interesting facts:

tags: prime - numbers - compression