The other day, Futility Closet posted this observation:
10102323454577 is the smallest 14-digit prime number that follows the rhyme scheme of a Shakespearean sonnet (ababcdcdefefgg).
So how many limerick primes are there? Well, there aren’t many candidates. A limerick prime has to have the form AABBA where A is an odd digit and B is any digit other than A. So for each of five choices of A, there are nine possible B’s. Here’s a Mathematica program to do a brute force search for limerick primes.
For[ j = 0, j < 5, j++, For[ k = 0, k < 10, k++, x = (2 j + 1)*11001 + 110 k; If[ PrimeQ[x], Print[x] ]]]
It turns out there are eight limerick primes:
See the next post for Mathematica code to list all sonnet primes.