OFFSET
1,1
COMMENTS
LINKS
MATHEMATICA
Select[Prime[Range[2 10^4]], Complement[IntegerDigits[#], {3, 4, 9}]=={} &] (* Vincenzo Librandi, Jul 30 2015 *)
Select[Flatten[Table[FromDigits/@Tuples[{3, 4, 9}, n], {n, 5}]], PrimeQ] (* Harvey P. Dale, May 02 2023 *)
PROG
(PARI) a(n, list=0, L=[3, 4, 9], 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=vecextract(L, v)*u) || next; reqpal && !isprime(A004086(t)) && next; list && print1(t", "); n--||return(t)))}
(Magma) [p: p in PrimesUpTo(2*10^5) | Set(Intseq(p)) subset [3, 4, 9]]; // Vincenzo Librandi, Jul 30 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 05 2011
STATUS
approved