A087363 Primes having only {3, 5, 7} as digits.
3, 5, 7, 37, 53, 73, 337, 353, 373, 557, 577, 733, 757, 773, 3373, 3533, 3557, 3733, 5333, 5557, 5573, 5737, 7333, 7537, 7573, 7577, 7753, 7757, 33353, 33377, 33533, 33577, 33757, 33773, 35353, 35533, 35537, 35573, 35753, 37337, 37357, 37537
Offset: 1
Links
- Jason Bard, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi)
- Index to entries for primes with digits in a given set
Programs
-
Magma
[p: p in PrimesUpTo(60000) | Set(Intseq(p)) subset [3, 5, 7]]; // Vincenzo Librandi, Jul 28 2012
-
Mathematica
Flatten[Table[Select[FromDigits/@Tuples[{3,5,7},n],PrimeQ],{n,6}]] (* Vincenzo Librandi, Jul 28 2012 *)
-
PARI
pdigitp(n) = { forprime(x=2,n, flag=1; y=x; for(j=1,length(Str(y)), r = y%10; if(r<>3 && r<>5 && r<>7,flag=0); y = floor(y/10); ); if(flag,print1(x",")); ) }
Extensions
Corrected by T. D. Noe, Nov 15 2006
Edited by Charles R Greathouse IV, Aug 02 2010
Name changed by Sean A. Irvine, Jul 20 2025
Comments