login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A034844 Primes with only nonprime decimal digits. 42
11, 19, 41, 61, 89, 101, 109, 149, 181, 191, 199, 401, 409, 419, 449, 461, 491, 499, 601, 619, 641, 661, 691, 809, 811, 881, 911, 919, 941, 991, 1009, 1019, 1049, 1061, 1069, 1091, 1109, 1181, 1409, 1481, 1489, 1499, 1601, 1609, 1619, 1669, 1699, 1801, 1811 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A109066(n) = 0 iff prime(n) is in this sequence. [Reinhard Zumkeller, Jul 11 2010, corrected by M. F. Hasler, Aug 27 2012]
Or, primes p such that A193238(p) = 0. - M. F. Hasler, Aug 27 2012
Intersection of A084984 and A000040; complement of A179336 (within the primes A000040). [Reinhard Zumkeller, Jul 19 2011, edited by M. F. Hasler, Aug 27 2012]
The smallest prime that contains all the six nonprime decimal digits is a(694) = 104869 (see Prime Curios! link). - Bernard Schott, Mar 21 2023
LINKS
Chris Caldwell, The First 1,000 Primes
Chris K. Caldwell and G. L. Honaker, Jr., 104869, Prime Curios!
FORMULA
a(n) >> n^1.285. [Charles R Greathouse IV, Feb 20 2012]
EXAMPLE
E.g. 149 is a prime made of nonprime digits(1,4,9).
991 is a prime without any prime digits.
MATHEMATICA
Select[Prime[Range[279]], Intersection[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* Jayanta Basu, Apr 18 2013 *)
Union[Select[Flatten[Table[FromDigits/@Tuples[{1, 4, 6, 8, 9, 0}, n], {n, 2, 4}]], PrimeQ]] (* Harvey P. Dale, Dec 08 2014 *)
PROG
(Haskell)
a034844 n = a034844_list !! (n-1)
a034844_list = filter (not . any (`elem` "2357") . show ) a000040_list
-- Reinhard Zumkeller, Jul 19 2011
(Magma) [p: p in PrimesUpTo(2000) | forall{d: d in [2, 3, 5, 7] | d notin Set(Intseq(p))}]; // Bruno Berselli, Jul 27 2011
(PARI) is_A034844(n)=isprime(n)&!apply(x->isprime(x), eval(Vec(Str(n)))) \\ M. F. Hasler, Aug 27 2012
(PARI) is_A034844(n)=isprime(n)&!setintersect(Set(Vec(Str(n))), Vec("2357")) \\ M. F. Hasler, Aug 27 2012
(Python)
from sympy import isprime
from itertools import product
def auptod(maxdigits):
alst = []
for d in range(1, maxdigits+1):
for p in product("014689", repeat=d-1):
if d > 1 and p[0] == "0": continue
for end in "19":
s = "".join(p) + end
t = int(s)
if isprime(t): alst.append(t)
return alst
print(auptod(4)) # Michael S. Branicky, Nov 19 2021
CROSSREFS
Sequence in context: A081027 A322474 A084986 * A092627 A152313 A034303
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Feb 22 2009 at the suggestion of R. J. Mathar
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 02:14 EDT 2024. Contains 371798 sequences. (Running on oeis4.)