|
|
A033274
|
|
Primes that do not contain any other prime as a proper substring.
|
|
27
|
|
|
2, 3, 5, 7, 11, 19, 41, 61, 89, 101, 109, 149, 181, 401, 409, 449, 491, 499, 601, 691, 809, 881, 991, 1009, 1049, 1069, 1481, 1609, 1669, 1699, 1801, 4001, 4049, 4481, 4649, 4801, 4909, 4969, 6091, 6469, 6481, 6869, 6949, 8009, 8069, 8081, 8609, 8669, 8681
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
If there is more than one digit, all digits must be nonprime numbers.
|
|
LINKS
|
|
|
EXAMPLE
|
149 is a term as 1, 4, 9, 14, 49 are all nonprimes.
199 is not a term as 19 is a prime.
|
|
MATHEMATICA
|
f[n_] := Block[ {id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[ Partition[ id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 1100, f@# == 1 &] (* Robert G. Wilson v, Aug 01 2010 *)
|
|
PROG
|
(Haskell)
import Data.List (elemIndices)
a033274 n = a033274_list !! (n-1)
a033274_list = map (a000040 . (+ 1)) $ elemIndices 0 a079066_list
(Python)
from sympy import isprime
def ok(n):
if n in {2, 3, 5, 7}: return True
s = str(n)
if set(s) & {"2", "3", "5", "7"} or not isprime(n): return False
ss2 = set(s[i:i+l] for i in range(len(s)-1) for l in range(2, len(s)))
return not any(isprime(int(ss)) for ss in ss2)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|