login
A030096
Primes whose digits are all odd.
23
3, 5, 7, 11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 113, 131, 137, 139, 151, 157, 173, 179, 191, 193, 197, 199, 311, 313, 317, 331, 337, 353, 359, 373, 379, 397, 557, 571, 577, 593, 599, 719, 733, 739, 751, 757, 773, 797, 911, 919, 937, 953, 971, 977, 991
OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
MATHEMATICA
Select[Prime[Range[500]], And@@OddQ[IntegerDigits[#]]&] (* Harvey P. Dale, Jan 28 2013 *)
PROG
(Haskell)
a030096 n = a030096_list !! (n-1)
a030096_list = filter f a000040_list where
f x = odd d && (x < 10 || f x') where (x', d) = divMod x 10
-- Reinhard Zumkeller, Apr 07 2014, Jan 29 2013
(PARI) is(n)=isprime(n) && #setintersect([0, 2, 4, 6, 8], Set(digits(n)))==0 \\ Charles R Greathouse IV, Feb 07 2017
(Magma) [p: p in PrimesUpTo(1000) | forall{d: d in [0, 2, 4, 6, 8] | d notin Set(Intseq(p))}]; // Vincenzo Librandi, Apr 29 2019
CROSSREFS
Cf. A076704 = odd-digit prime powers of prime numbers; A091296 = odd-digit semiprimes; A000040 = prime numbers; A001358 = semiprimes.
Intersection of A000040 and A014261.
Sequence in context: A269326 A163422 A155055 * A045394 A264030 A070739
KEYWORD
nonn,base,nice
EXTENSIONS
Edited by N. J. A. Sloane at the suggestion of T. D. Noe and Jonathan Vos Post, Sep 15 2007
STATUS
approved