A019546 Primes whose digits are primes; primes having only {2, 3, 5, 7} as digits.
2, 3, 5, 7, 23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557
Offset: 1
References
- Paulo Ribenboim, Prime Number Records (Chap 3), in 'My Numbers, My Friends', Springer-Verlag 2000 NY, page 76.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- József Bölcsföldi and György Birkás, Golden ratio prime numbers, International Journal of Engineering Science Invention (2018) Vol. 6 Issue 12, 82-85.
- David Broadhurst: primeform, 82000-digit prime with all digits prime [Broken link]
- David Broadhurst, 82000-digit prime with all digits prime, digest of 2 messages in primeform Yahoo group, Oct 20 - Oct 25, 2003.
- Chris K. Caldwell, The Prime Glossary: Prime-digit prime
- Chris K. Caldwell and G. L. Honaker, Jr., 2357, Prime Curios!
- Chris K. Caldwell and G. L. Honaker, Jr., 7523, Prime Curios!
- H. Ibstedt, A Few Smarandache Integer Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, pp. 171-183.
- Sylvester Smith, A Set of Conjectures on Smarandache Sequences, Bulletin of Pure and Applied Sciences, (Bombay, India), Vol. 15 E (No. 1), 1996, pp. 101-107.
- Eric Weisstein's MathWorld Headline News, Two Gigantic Primes with Prime Digits Found
- Eric Weisstein's World of Mathematics, Smarandache Sequences
- Index to entries for primes with digits in a given set
Crossrefs
Programs
-
Haskell
a019546 n = a019546_list !! (n-1) a019546_list = filter (all (`elem` "2357") . show ) ([2,3,5] ++ (drop 2 a003631_list)) -- Or, much more efficient: a019546_list = filter ((== 1) . a010051) $ [2,3,5,7] ++ h ["3","7"] where h xs = (map read xs') ++ h xs' where xs' = concat $ map (f xs) "2357" f xs d = map (d :) xs -- Reinhard Zumkeller, Jul 19 2011
-
Magma
[p: p in PrimesUpTo(5600) | Set(Intseq(p)) subset [2,3,5,7]]; // Bruno Berselli, Jan 13 2012
-
Mathematica
Select[Prime[Range[700]], Complement[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* Alonso del Arte, Aug 27 2012 *) Select[Prime[Range[700]], AllTrue[IntegerDigits[#], PrimeQ] &] (* Ivan N. Ianakiev, Jun 23 2018 *) Select[Flatten[Table[FromDigits/@Tuples[{2,3,5,7},n],{n,4}]],PrimeQ] (* Harvey P. Dale, Apr 05 2025 *)
-
PARI
is_A019546(n)=isprime(n) & !setminus(Set(Vec(Str(n))),Vec("2357")) \\ M. F. Hasler, Jan 13 2012
-
PARI
print1(2); for(d=1,4, forstep(i=1,4^d-1,[1,1,2], p=sum(j=0,d-1,10^j*[2,3,5,7][(i>>(2*j))%4+1]); if(isprime(p), print1(", "p)))) \\ Charles R Greathouse IV, Apr 29 2015
-
Python
from itertools import product from sympy import isprime A019546_list = [2,3,5,7]+[p for p in (int(''.join(d)+e) for l in range(1,5) for d in product('2357',repeat=l) for e in '37') if isprime(p)] # Chai Wah Wu, Jun 04 2021
Extensions
More terms from Cino Hilliard, Aug 06 2006
Thanks to Charles R Greathouse IV and T. D. Noe for massive editing support.
Comments