Left Truncatable Primes  
Home Page > Fun Stuff > 2002 > Truncatable Primes  

I finished my last final exam of the semester last night. So I finally got to play around with some of the stuff I learned in my Cryptography class this semester. So yes, I was doing extra homework, and math homework at that.
We learned a simple math calculator programming language called Pari. For at least ten years, I had wondered if there was a set of prime numbers with the property that you can chop off digits on the left hand side, and the number would still be prime. Well, I finally took the time to find out. I could have used Mathematica a long time ago, but I would have had to learn it all over again. And since I had learned Pari for my class, I used that language to figure out this problem.
I knew that these kinds of prime numbers exist, I just didn't know how many of them there were, or what the largest one was. Here's an example: 4967 is prime. And it is still prime if you chop off the 4, i.e. 967 is prime. So is 67 and 7.
It turns out that any such number has to end in 3 or 7 because 1, 2, 4, 5, 6, 8, and 9 are all composite numbers.
"PARIGP is a software package for computeraided number theory", see http://www.parigphome.de/). This software lets you do calculations with really big numbers. And I think really big numbers are cool. Especially prime numbers. In fact, my Social Security number is prime, a fact of which I am very proud. (And no, I'm not telling what it is). Anyway, I found the largest "Restricted Left Truncatable Prime", and it is: 357686312646216567629137
357686312646216567629137 is prime
57686312646216567629137 is prime
7686312646216567629137 is prime
686312646216567629137 is prime
86312646216567629137 is prime
6312646216567629137 is prime
312646216567629137 is prime
12646216567629137 is prime
2646216567629137 is prime
646216567629137 is prime
46216567629137 is prime
6216567629137 is prime
216567629137 is prime
16567629137 is prime
6567629137 is prime
567629137 is prime
67629137 is prime
7629137 is prime
629137 is prime
29137 is prime
9137 is prime
137 is prime
37 is prime
7 is prime
Finding Info Online I had made a halfhearted attempt to look for this answer online. But I didn't find anything, because I didn't know what to call these kind of numbers.
It turns out they're called "Truncatable Primes", or in the specific case of the number I found, "Restricted Left Truncatable Primes". Restricted because you can't add any more digits, and Left because you're adding digits on the left.
Anyway, once I calculated the answer, I did a Google search for it, and of course I found dozens of pages about this problem. So I wasn't the first. But I did calculate this on my own, independently.
So sometimes, you just have to know what to look for in search engines.
Anyway, this MathSource article on Truncated Primes is the best link that describes this interesting problem.
This semester, Cryptography was the class I learned the most in this semester. However, it's probably the class I'm going to get the lowest grade in. The final exam yesterday was pretty easy, but I still don't think I did very well on it.
Matthew, 13Dec2002
Created and maintained by Matthew Weathers. Last updated Apr 20, 2006.