OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
MATHEMATICA
npQ[n_]:=!PrimeQ[n]&&FreeQ[IntegerDigits[n], 0]&&AllTrue[FromDigits/@ Table[Drop[IntegerDigits[n], {k}], {k, IntegerLength[n]}], !PrimeQ[#]&]; Select[Range[10, 300], npQ](* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 19 2021 *)
PROG
(Haskell)
a034305 n = a034305_list !! (n-1)
a034305_list = filter f $ drop 9 a052382_list where
f x = a010051' x == 0 &&
(all (== 0) $ map (a010051' . read) $
zipWith (++) (inits $ show x) (tail $ tails $ show x))
-- Reinhard Zumkeller, May 10 2015
(PARI) is(n)=my(d=digits(n)); if(#d<2 || vecmin(d)<1 || isprime(n), return(0)); for(i=0, #d-1, if(isprime(fromdigits(vecextract(d, 2^#d-1-2^i))), return(0))); 1 \\ Charles R Greathouse IV, Jun 25 2017
(Python)
from sympy import isprime
def ok(n):
if n < 10 or isprime(n): return False
s = str(n)
return "0" not in s and not any(isprime(int(s[:i]+s[i+1:])) for i in range(len(s)))
print([k for k in range(229) if ok(k)]) # Michael S. Branicky, Jan 15 2023
CROSSREFS
KEYWORD
base,nonn,nice
AUTHOR
EXTENSIONS
Definition corrected by T. D. Noe, Apr 02 2008
Single-digit terms removed again by Georg Fischer, Jun 21 2021
STATUS
approved