%I #14 Nov 14 2018 02:05:54
%S 2,13,103,1013,10039,100103,1000193,10000931,100001903,1000003957,
%T 10000003957,100000013957,1000000030957,10000000301957,
%U 100000000730957,1000000000730957,10000000003632979,100000000007309357
%N Smallest n-digit base-10 deletable prime.
%C A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime. "Digit" means digit in base b.
%C Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.
%t b = 10; a = {2}; d = {2, 3, 5, 7};
%t For[n = 2, n <= 6, n++,
%t found = False;
%t p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &];
%t For[i = 1, i <= Length[p], i++,
%t c = IntegerDigits[p[[i]], b];
%t For[j = 1, j <= n, j++,
%t t = Delete[c, j];
%t If[t[[1]] == 0, Continue[]];
%t If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]];
%t If[! found , AppendTo[a, p[[i]]]]; found = True; Break[]]];
%t ]]; a (* _Robert Price_, Nov 13 2018 *)
%Y Cf. A080608, A096243, A096246, A125590.
%K nonn,base
%O 1,1
%A _N. J. A. Sloane_, Jan 07 2007
%E a(6) - a(8) from _Michael Kleber_, Jan 08 2007
%E a(9) - a(14) from _Phil Carmody_, Jan 09 2007
%E a(15) - a(18) from _Joshua Zucker_, Jan 09 2007
|