Picking a strobogrammatic prime number domain name
April
13th,
2018
Why…
After several sessions of scratching my chin thinking about a text based domain name and coming up with no good ideas, or finding out that the best ones where already taken, I decided to simplify the whole thing and just pick a number.
If you can pick any number, why not picking a cool number…
A strobogrammatic number is a number whose numeral is rotationally symmetric, so that it appears the same when rotated 180 degrees. In other words, the numeral looks the same right-side up and upside down (e.g., 69, 96, 1001). A strobogrammatic prime is a strobogrammatic number that is also a prime number, i.e., a number that is only divisible by one and itself.
Finding a strobogrammatic prime number
I put together a simple script to find the numbers
#!/bin/env python3
# Find strobogrammatic prime numbers
# Implementation of the AKS algorith
# Source https://stackoverflow.com/a/1801446
defisPrime(n):'''Returns True if n is a prime number'''if(n==2)or(n==3):returnTrueif(n%2==0)or(n%3==0):returnFalsei=5w=2whilei*i<=n:ifn%i==0:returnFalsei+=ww=6-wreturnTrue# Source https://github.com/kamyu104/LeetCode/blob/master/Python/strobogrammatic-number.py
defisStrobogrammatic(num):'''Returns True if n is a strobogrammatic string'''lookup={'0':'0','1':'1','6':'9','8':'8','9':'6'}n=len(num)foriinrange(round((n+1)/2)):ifnum[n-1-i]notinlookupor \
num[i]!=lookup[num[n-1-i]]:returnFalsereturnTrue# I only want numbers of 5 and 6 digits
x=10001whilex<=999999:ifisStrobogrammatic(str(x)):ifisPrime(x):print("strobogrammatic prime: ",x)x+=2
$ time python3 ./strobogrammatic_prime_number_finder.py
strobogrammatic prime: 16091
strobogrammatic prime: 18181
strobogrammatic prime: 19861
strobogrammatic prime: 61819
strobogrammatic prime: 116911
strobogrammatic prime: 119611
strobogrammatic prime: 160091
strobogrammatic prime: 169691
strobogrammatic prime: 191161
strobogrammatic prime: 196961
strobogrammatic prime: 686989
strobogrammatic prime: 688889
python3 ./strobogrammatic_prime_number_finder.py 0.83s user 0.01s system 98% cpu 0.852 total
And the winner is… 191161.xyz
Because I want my dns to support DNSSEC (reasons…) I needed to pick a TLD which root zone has been signed. I choose some of the prime numbers and a couple cheap TLD, and after reviewing my options, I locked in with 191161.xyz for $5 a year.