A superprime is an integer such that all its left-to-right initial segments are prime (e.g. 7331 whose segments are 7, 73, 733, and 7331, all prime).
There is a largest superprime.
Find it.
Source: USA Computing Olympiad,
Feb 1995.
I built my list by hand with help from http://www.walter-fendt.de/m14e/primes.htm to help me add a digit to each of my longest primes.
It makes a nice tree diagram.
The number of superprimes of 1,2,... digits is 4,10,15,18,16,12,8,5,0,0,0,0,0...
I was surprised that not one of the 5 primes of length 8 could be extended. The largest of them is 73939133.
|
Posted by Jer
on 2010-10-21 15:39:50 |