This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A051362 Primes remaining prime if any digit is deleted (zeros allowed). 19

%I

%S 23,37,53,73,113,131,137,173,179,197,311,317,431,617,719,1013,1031,

%T 1097,1499,1997,2239,2293,3137,4019,4919,6173,7019,7433,9677,10193,

%U 10613,11093,19973,23833,26833,30011,37019,40013,47933,73331,74177

%N Primes remaining prime if any digit is deleted (zeros allowed).

%C These might be called "super-prime numbers". - Jaime Gutierrez (jgutierrez(AT)matematicas.net), Sep 27 2007

%C A proper subset of A034895. - _Robert G. Wilson v_, Oct 12 2014

%H T. D. Noe and Giovanni Resta, <a href="/A051362/b051362.txt">Table of n, a(n) for n = 1..201</a> (terms < 10^13, first 100 terms from T. D. Noe)

%H StackExchange, <a href="http://math.stackexchange.com/questions/33094">Deleting any digit yields a prime</a>

%p P:=proc(q) local a,b,i,ok,n; for n from 1 to q do a:=ithprime(n); b:=0;

%p ok:=1; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n);

%p for i from 0 to b-1 do if not isprime(trunc(a/10^(i+1))*10^i+(a mod 10^i))

%p then ok:=0; break; fi; od; if ok=1 then print(ithprime(n)); fi;

%p od; end: P(10^6); # _Paolo P. Lava_, Oct 25 2013

%t rpQ[n_]:=Module[{idn=IntegerDigits[n]},And@@PrimeQ[FromDigits/@ Subsets[ IntegerDigits[ n],{Length[idn]-1}]]]; Select[Prime[Range[40000]], rpQ]

%o (Haskell)

%o import Data.List (inits, tails)

%o a051362 n = a051362_list !! (n-1)

%o a051362_list = filter p \$ drop 4 a000040_list where

%o p x = all (== 1) \$ map (a010051 . read) \$

%o zipWith (++) (inits \$ show x) (tail \$ tails \$ show x)

%o -- _Reinhard Zumkeller_, Dec 17 2011, Aug 24 2011

%o (PARI) is(n)=my(v=Vec(Str(n)),k);for(i=1, #v, k=eval(concat(vecextract(v, 2^#v-1-2^(i-1))));if(!isprime(k),return(0)));isprime(n) \\ _Charles R Greathouse IV_, Oct 05 2011

%o (Sage)

%o def is_A051362(n):

%o prime = is_prime(n)

%o if prime:

%o L = ZZ(n).digits(10)

%o for k in range(len(L)):

%o K = L[:]; del K[k]

%o prime = is_prime(ZZ(K, base=10))

%o if not prime: break

%o return prime

%o A051362_list = lambda n: filter(is_A051362, range(n))

%o A051362_list(77777) # _Peter Luschny_, Jul 17 2014

%Y Cf. A034302, A010051, A000040, A034895.

%K nonn,base,nice

%O 1,1

%A _Harvey P. Dale_, May 31 2000

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

Last modified July 15 14:28 EDT 2019. Contains 325031 sequences. (Running on oeis4.)