34 minutes ago · Tech · hide

There’s an old joke about having to enter a 12-digit prime number to continue using a program. I wrote about this years ago, on how to use Python to come up with a 12-digit prime. But suppose you do this often, and so you’d like memorize a 12-digit prime so you could enter it without having to run a Python script. Here’s an easy one: 999999999989. The following code verifies that this number is prime. >>> from sympy import isprime >>> isprime(999999999989) True Major system encoding Maybe that’s too easy, so you’d like to first find a 12-digit prime, then memorize it using the Major memory system. >>> import random >>> while True: ... candidate = random.randint(10**11, 10**12 - 1) ... if isprime(candidate): ... print(candidate) ... break ... 298412857819 To encode 298412857819, you might come up with “knob o’ fire, tin foil, cave tuba.” These things look ridiculous when written down, but they actually work, especially when you come up with them yourself: it’s hard to reuse someone…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town