409 is an interesting prime number. If you remove any number of its digits, then you will get a number that is not prime.
Call a number with this property a minimal prime. Find all minimal primes.
(In reply to of course it also inspires a computer program
... and of course that could be put into a loop to find the minimal primes. However, the below program took almost half an hour to get to the highest one, and there was no way for it to determine that it was in fact the last. Further, the ones up to six digits took only a few seconds, so if one didn't know there were more one might have given up and stopped the program prematurely. Even though the primes get farther apart as you go up in scale, the individual primes take longer to check out for minimality as they get bigger.
But of course I had thought my manual solution had come up with all of them, and it had missed one. And not only that, but now (in edit after posting) I've read Math Man's comment and I see I missed another, while accepting a non-minimal.
50 if prmdiv(val(Tst))<val(Tst) then Good=0:else gosub *Testing(1)
60 if Good then print Tst
65 until Tst="0"
100 if Psn=len(Tst) then
120 :if prmdiv(Prtst)=Prtst and Prtst<>0 and Prtst<>1 then Good=0:endif
140 :gosub *Testing(Psn+1)
160 if Psn=len(Tst) and Psn>len(Pr) then
180 :if prmdiv(Prtst)=Prtst and Prtst<>0 and Prtst<>1 then Good=0:endif
190 if Psn<len(Tst) then
200 :gosub *Testing(Psn+1)
Edited on April 24, 2012, 5:30 pm
Posted by Charlie
on 2012-04-24 17:28:34