This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A080608 Deletable primes: primes such that removing some digit leaves either the empty string or another deletable prime. 23

%I

%S 2,3,5,7,13,17,23,29,31,37,43,47,53,59,67,71,73,79,83,97,103,107,113,

%T 127,131,137,139,157,163,167,173,179,193,197,223,229,233,239,263,269,

%U 271,283,293,307,311,313,317,331,337,347,353,359,367,373,379,383,397,431,433,439

%N Deletable primes: primes such that removing some digit leaves either the empty string or another deletable prime.

%C Subsequence of A179336. - _Reinhard Zumkeller_, Jul 11 2010

%C Leading zeros are allowed, for example the prime 100003 is deletable because of the sequence 00003, 0003, 003, 03, 3 consists of primes. Because of this, it appears that deletable primes are relatively common in the region just above a power of ten. For example 10^1000 + 2713 is a deletable prime. - _Jeppe Stig Nielsen_, Aug 01 2018

%C For a version that does not allow leading zeros, see A305352. - _Jeppe Stig Nielsen_, Aug 01 2018

%H David W. Wilson, <a href="/A080608/b080608.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DeletablePrime.html">Deletable Prime</a>

%e 410256793 is a deletable prime since each member of the sequence 410256793, 41256793, 4125673, 415673, 45673, 4567, 467, 67, 7 is prime (Weisstein, Caldwell).

%p isA080608 := proc(n)

%p option remember;

%p local dgs,i ;

%p if isprime(n) then

%p if n < 10 then

%p true;

%p else

%p dgs := convert(n,base,10) ;

%p for i from 1 to nops(dgs) do

%p subsop(i=NULL,dgs) ;

%p digcatL(ListTools[Reverse](%)) ;

%p if procname(%) then

%p return true;

%p end if;

%p end do:

%p false ;

%p end if;

%p else

%p false;

%p end if;

%p end proc:

%p n := 1;

%p for i from 1 to 500 do

%p p := ithprime(i) ;

%p if isA080608(p) then

%p printf("%d %d\n",n,p) ;

%p n := n+1 ;

%p fi ;

%p end do: # _R. J. Mathar_, Oct 11 2014

%t Rest@ Union@ Nest[Function[{a, p}, Append[a, With[{w = IntegerDigits[p]}, If[# == True, p, 0] &@ AnyTrue[Array[FromDigits@ Delete[w, #] &, Length@ w], ! FreeQ[a, #] &]]]] @@ {#, Prime[Length@ # + 1]} &, Prime@ Range@ PrimePi@ 10, 81] (* _Michael De Vlieger_, Aug 02 2018 *)

%o (PARI) is(n) = !ispseudoprime(n)&&return(0);my(d=digits(n));#d==1&&return(1);for(i=1,#d,is(fromdigits(vecextract(d,Str("^"i))))&&return(1));0 \\ _Jeppe Stig Nielsen_, Aug 01 2018

%Y Cf. A080603, A096235-A096246, A305352.

%K nonn,easy,base,changed

%O 1,1

%A _David W. Wilson_, Feb 25 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 16 03:24 EDT 2018. Contains 313782 sequences. (Running on oeis4.)