login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A051362
Primes remaining prime if any digit is deleted (zeros allowed).
23
23, 37, 53, 73, 113, 131, 137, 173, 179, 197, 311, 317, 431, 617, 719, 1013, 1031, 1097, 1499, 1997, 2239, 2293, 3137, 4019, 4919, 6173, 7019, 7433, 9677, 10193, 10613, 11093, 19973, 23833, 26833, 30011, 37019, 40013, 47933, 73331, 74177
OFFSET
1,1
COMMENTS
These might be called "super-prime numbers". - Jaime Gutierrez (jgutierrez(AT)matematicas.net), Sep 27 2007
A proper subset of A034895. - Robert G. Wilson v, Oct 12 2014
The largest known number in this sequence is a 274-digit prime consisting of 163 4s, followed by 80 0s, followed by 31 1s. See the CodeGolf link. - Dmitry Kamenetsky, Feb 26 2021
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..201 (terms < 10^13; first 100 terms from T. D. Noe)
Mathematics StackExchange, Deleting any digit yields a prime, 2011.
MATHEMATICA
rpQ[n_]:=Module[{idn=IntegerDigits[n]}, And@@PrimeQ[FromDigits/@ Subsets[ IntegerDigits[ n], {Length[idn]-1}]]]; Select[Prime[Range[40000]], rpQ]
prpQ[n_]:=AllTrue[FromDigits/@Table[Delete[IntegerDigits[n], d], {d, IntegerLength[ n]}], PrimeQ]; Select[Prime[Range[7500]], prpQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 27 2020 *)
PROG
(Haskell)
import Data.List (inits, tails)
a051362 n = a051362_list !! (n-1)
a051362_list = filter p $ drop 4 a000040_list where
p x = all (== 1) $ map (a010051 . read) $
zipWith (++) (inits $ show x) (tail $ tails $ show x)
-- Reinhard Zumkeller, Dec 17 2011, Aug 24 2011
(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
(Sage)
def is_A051362(n):
prime = is_prime(n)
if prime:
L = ZZ(n).digits(10)
for k in range(len(L)):
K = L[:]; del K[k]
prime = is_prime(ZZ(K, base=10))
if not prime: break
return prime
A051362_list = lambda n: filter(is_A051362, range(n))
A051362_list(77777) # Peter Luschny, Jul 17 2014
(Python)
from sympy import isprime
def ok(n):
if n < 10 or not isprime(n): return False
s = str(n)
return all(isprime(int(s[:i]+s[i+1:])) for i in range(len(s)))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Nov 02 2023
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Harvey P. Dale, May 31 2000
STATUS
approved