cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A125589 Smallest n-digit base-10 deletable prime.

This page as a plain text file.
%I A125589 #14 Nov 14 2018 02:05:54
%S A125589 2,13,103,1013,10039,100103,1000193,10000931,100001903,1000003957,
%T A125589 10000003957,100000013957,1000000030957,10000000301957,
%U A125589 100000000730957,1000000000730957,10000000003632979,100000000007309357
%N A125589 Smallest n-digit base-10 deletable prime.
%C A125589 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 A125589 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 A125589 b = 10; a = {2}; d = {2, 3, 5, 7};
%t A125589 For[n = 2, n <= 6, n++,
%t A125589   found = False;
%t A125589   p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &];
%t A125589   For[i = 1, i <= Length[p], i++,
%t A125589    c = IntegerDigits[p[[i]], b];
%t A125589    For[j = 1, j <= n, j++,
%t A125589     t = Delete[c, j];
%t A125589     If[t[[1]] == 0, Continue[]];
%t A125589     If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]];
%t A125589      If[! found , AppendTo[a, p[[i]]]]; found = True; Break[]]];
%t A125589 ]]; a (* _Robert Price_, Nov 13 2018 *)
%Y A125589 Cf. A080608, A096243, A096246, A125590.
%K A125589 nonn,base
%O A125589 1,1
%A A125589 _N. J. A. Sloane_, Jan 07 2007
%E A125589 a(6) - a(8) from _Michael Kleber_, Jan 08 2007
%E A125589 a(9) - a(14) from _Phil Carmody_, Jan 09 2007
%E A125589 a(15) - a(18) from _Joshua Zucker_, Jan 09 2007