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.
(In reply to
re(2): Another method. -- solution for that Euler problem 37 by Charlie)
Doing both left-to-right and combined left-to-right and right-to-left makes me wonder about whether there's a limit to the size of right-to-left-only building of the primes. A preliminary trial with UBASIC runs into numbers too big for UBASIC to check for primeness by itself, and the largest prime built from right to left it found to that point was 92769326113.
Is there no largest such prime built from right to left?
|
Posted by Charlie
on 2010-10-21 11:41:36 |