A199345 Primes having only {3, 4, 5} as digits.
3, 5, 43, 53, 353, 433, 443, 3343, 3433, 3533, 5333, 5443, 33343, 33353, 33533, 34543, 35353, 35533, 35543, 43543, 44453, 44533, 44543, 45343, 45433, 45533, 45553, 53353, 53453, 54443, 55333, 55343, 333433, 333533, 334333, 335453, 343333, 343433, 343543, 344353, 344453, 344543, 345533, 353333, 353443, 353453, 354353, 354443
Offset: 1
Links
- Jason Bard, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harvey P. Dale)
Programs
-
Magma
[p: p in PrimesUpTo(4*10^5) | Set(Intseq(p)) subset [3..5]]; // Bruno Berselli, Nov 07 2011
-
Mathematica
Join[{3,5},Select[Flatten[Table[FromDigits/@(Join[#,{3}]&/@ Tuples[ {3,4,5},n]),{n,5}]],PrimeQ]] (* Harvey P. Dale, Aug 31 2015 *)
-
PARI
a(n, list=0, L=[3, 4, 5], reqpal=0)={my(t); for(d=1, 1e9, u=vector(d, i, 10^(d-i))~; forvec(v=vector(d, i, [1+(i==1&!L[1]), #L]), isprime(t=vector(d, i, L[v[i]])*u) || next; reqpal & !isprime(A004086(t)) & next; list & print1(t", "); n--||return(t)))}