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!)
A019546 Primes whose digits are primes. 102

%I #100 Apr 28 2023 22:36:09

%S 2,3,5,7,23,37,53,73,223,227,233,257,277,337,353,373,523,557,577,727,

%T 733,757,773,2237,2273,2333,2357,2377,2557,2753,2777,3253,3257,3323,

%U 3373,3527,3533,3557,3727,3733,5227,5233,5237,5273,5323,5333,5527,5557

%N Primes whose digits are primes.

%C Intersection of A046034 and A000040; A055642(a(n)) = A193238(a(n)). - _Reinhard Zumkeller_, Jul 19 2011

%C Ribenboim mentioned in 2000 the following number as largest known term: 72323252323272325252 * (10^3120 - 1) / (10^20 - 1) + 1. It has 3120 digits, and was discovered by Harvey Dubner in 1992. Larger terms are 22557252272*R(15600)/R(10) and 2255737522*R(15600) where R(n) denotes the n-th repunit (see A002275): Both have 15600 digits and were found in 2002, also by Dubner (see Weisstein link). _David Broadhurst_ reports in 2003 an even longer number with 82000 digits: (10^40950+1) * (10^20055+1) * (10^10374 + 1) * (10^4955 + 1) * (10^2507 + 1) * (10^1261 + 1) * (3*R(1898) + 555531001*10^940 - R(958)) + 1, see link. - _Reinhard Zumkeller_, Jan 13 2012

%C The smallest and largest primes that use exactly once the four prime decimal digits are respectively a(27)= 2357 and a(54) = 7523. - _Bernard Schott_, Apr 27 2023

%D Paulo Ribenboim, Prime Number Records (Chap 3), in 'My Numbers, My Friends', Springer-Verlag 2000 NY, page 76.

%H Reinhard Zumkeller, <a href="/A019546/b019546.txt">Table of n, a(n) for n = 1..10000</a>

%H József Bölcsföldi and György Birkás, <a href="http://www.ijesi.org/papers/Vol(6)12/Version-2/L0612028285.pdf">Golden ratio prime numbers</a>, International Journal of Engineering Science Invention (2018) Vol. 6 Issue 12, 82-85.

%H David Broadhurst: primeform, <a href="http://groups.yahoo.com/group/primeform/message/3846">82000-digit prime with all digits prime</a> [Broken link]

%H David Broadhurst, <a href="/A019546/a019546.txt">82000-digit prime with all digits prime</a>, digest of 2 messages in primeform Yahoo group, Oct 20 - Oct 25, 2003.

%H Chris K. Caldwell, <a href="https://t5k.org/glossary/xpage/PrimeDigitPrime.html">The Prime Glossary: Prime-digit prime</a>

%H Chris K. Caldwell and G. L. Honaker, Jr., <a href="https://t5k.org/curios/page.php?short=2357">2357</a>, Prime Curios!

%H Chris K. Caldwell and G. L. Honaker, Jr., <a href="https://t5k.org/curios/page.php?short=7523">7523</a>, Prime Curios!

%H H. Ibstedt, <a href="https://www.gallup.unm.edu/~smarandache/SN/SIntegerSeq.pdf">A Few Smarandache Integer Sequences</a>, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, pp. 171-183.

%H Sylvester Smith, <a href="https://www.gallup.unm.edu/~smarandache/SYLSMITH.HTM">A Set of Conjectures on Smarandache Sequences</a>, Bulletin of Pure and Applied Sciences, (Bombay, India), Vol. 15 E (No. 1), 1996, pp. 101-107.

%H Eric Weisstein's MathWorld Headline News, <a href="http://mathworld.wolfram.com/news/2002-04-09/primeprimes/">Two Gigantic Primes with Prime Digits Found</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SmarandacheSequences.html">Smarandache Sequences </a>

%t Select[Prime[Range[700]], Complement[IntegerDigits[#], {2, 3, 5, 7}] == {} &] (* _Alonso del Arte_, Aug 27 2012 *)

%t Select[Prime[Range[700]], AllTrue[IntegerDigits[#], PrimeQ] &] (* _Ivan N. Ianakiev_, Jun 23 2018 *)

%o (PARI) is_A019546(n)=isprime(n) & !setminus(Set(Vec(Str(n))),Vec("2357")) \\ _M. F. Hasler_, Jan 13 2012

%o (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

%o (Haskell)

%o a019546 n = a019546_list !! (n-1)

%o a019546_list = filter (all (`elem` "2357") . show )

%o ([2,3,5] ++ (drop 2 a003631_list))

%o -- Or, much more efficient:

%o a019546_list = filter ((== 1) . a010051) $

%o [2,3,5,7] ++ h ["3","7"] where

%o h xs = (map read xs') ++ h xs' where

%o xs' = concat $ map (f xs) "2357"

%o f xs d = map (d :) xs

%o -- _Reinhard Zumkeller_, Jul 19 2011

%o (Magma) [p: p in PrimesUpTo(5600) | Set(Intseq(p)) subset [2,3,5,7]]; // _Bruno Berselli_, Jan 13 2012

%o (Python)

%o from itertools import product

%o from sympy import isprime

%o 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

%Y Cf. A045336, A003631, A034844, A179336, A109066, A215927.

%Y Cf. A020463 (subsequence).

%Y A093162, A093164, A093165, A093168, A093169, A093672, A093674, A093675, A093938 and A093941 are subsequences. - _XU Pingya_, Apr 20 2017

%K nonn,base

%O 1,1

%A R. Muller

%E More terms from _Cino Hilliard_, Aug 06 2006

%E Thanks to _Charles R Greathouse IV_ and _T. D. Noe_ for massive editing support.

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 March 28 14:19 EDT 2024. Contains 371254 sequences. (Running on oeis4.)